摘要:
"""1.使用第一种反反爬措施User-Agent(伪装浏览器)"""import chardetimport requestsfrom urllib import request# 使用etree python3.5以上 ,不支持etree,from lxml import html# 1.得到所 阅读全文
posted @ 2019-06-04 09:19
猫有九命
阅读(514)
评论(0)
推荐(0)
摘要:
"""使用cook模拟登陆(反 登录)"""from urllib import requestimport chardetdef baiDu(): url = "https://www.baidu.com/" headers={"User-Agent": "Mozilla/5.0 (Windows 阅读全文
posted @ 2019-06-04 09:17
猫有九命
阅读(431)
评论(0)
推荐(0)
摘要:
"""使用ip代理进行网站访问,(反封禁ip手段)"""from urllib import requestimport chardetclass BaiDu(object): def baidu(self): url = "https://www.baidu.com/" headers = { " 阅读全文
posted @ 2019-06-04 09:15
猫有九命
阅读(455)
评论(0)
推荐(0)
摘要:
使用cook模拟登陆(反 登录)"""from urllib import requestimport chardetdef baiDu(): url = "https://www.baidu.com/" headers={"User-Agent": "Mozilla/5.0 (Windows NT 阅读全文
posted @ 2019-06-04 09:09
猫有九命
阅读(108)
评论(0)
推荐(0)

浙公网安备 33010602011771号