- 博客(4)
- 收藏
- 关注
原创 04python3.0爬虫之反爬虫(随机User Agent、获取代理IP)
随机User Agent安装和导入# 安装fake_useragentpip install fake_useragent# 导入fake_useragentfrom fake_useragent import UserAgent获取User-Agentua=UserAgent()print(ua.ie)print(ua.chrome)print(ua.firefox)print(ua.safari)print(ua.opera)print(ua.random) #
2020-07-16 15:47:59 421
转载 转载网络爬虫的相关文章
以下连接均为转载Python3网络爬虫(一):利用urllib进行简单的网页抓取Python3网络爬虫(二):利用urllib.urlopen向有道翻译发送数据获得翻译结果Python3网络爬虫(三):urllib.error异常Python3网络爬虫(四):使用User Agent和代理IP隐藏身份Python3网络爬虫(五):Python3安装ScrapyPython3网络爬虫(六):Python3使用Cookie-模拟登陆获取妹子联系方式Python3网络爬虫(七):使用Beautifu
2020-07-13 14:35:22 188
原创 01python3.0爬虫之Beautiful Soup的简单使用
1.安装和导入pip install beautifulsoup4from bs4 import BeautifulSoup2.BeautifulSoup的一些属性BS.body :BS.标签名称 —》获取标签下所有内容Beautiful Soup的四大对象之Tag:soup.body.name -----》BS.标签.name:获取标签的名称soup.标签.attrs ----》BS.标签.attrs:获取该标签下所有属性,返回一个dictBeautiful Soup
2020-07-12 10:50:16 156
原创 21python框架之peewee
一、定义数据库连接和model1、class Meta:database:连接数据库table_name:该mudel对应的数据表2、常用字段类型IntegerFieldCharFieldTextFieldDateTimeFieldForeignKeyField:from_user = ForeignKeyField(关联的Model, backref=“外键名称”,相当于所关联的Model多了此属性)3、字段属性null = False – 非空约束index = Fal
2020-07-07 13:18:54 1124
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人