Loading

摘要: x86 : 无法将“x86”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次 PS C:\Users\Lee> cd C:\Program Files (x86) x86 : 无法将“x86”项识别为 cmdlet、函数、脚本文件 阅读全文
posted @ 2020-12-03 17:30 lixin2020 阅读(453) 评论(0) 推荐(0)
摘要: 爬取方法选择 直接爬取: import requests url = 'https://sou.zhaopin.com/?jl=530&kw=Java%E5%BC%80%E5%8F%91&kt=3' #将爬虫伪装成浏览器请求网页数据 headers = {'User-Agent':'Mozilla/ 阅读全文
posted @ 2020-12-03 17:11 lixin2020 阅读(3197) 评论(0) 推荐(0)
摘要: 爬虫的异常处理 在爬取失败后使用递归调用再次进行爬取 def download3(url, num_retries=2): print('Downloading:', url) try: html = urllib2.urlopen(url).read() except urllib2.URLErr 阅读全文
posted @ 2020-12-03 00:26 lixin2020 阅读(415) 评论(0) 推荐(0)