RemoteDisconnected: Remote end closed connection without response
爬智联招聘数据时候报错:“RemoteDisconnected: Remote end closed connection without response”
利用 urllib 发起的请求,UA 默认是 Python-urllib/3.5 而在 chrome 中访问 UA 则是 User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36,因为服务器根据 UA 来判断拒绝了 python 爬虫。
把python伪装成Firefox去爬取智联招聘的数据