爬虫过程报错:http.client.RemoteDisconnected: Remote end closed connection without response
因为服务器根据 UA 来判断拒绝了 python 爬虫。
添加
headers = {'User-Agent': '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'}
伪装成google浏览器