刚接触动态爬虫,还没搞明白怎么玩,目前想爬网站把爬到的数据都能保存为像抓包那样的格式,有什么好的方式么,希望大牛们多多指教
希望爬取到的 get post 等请求都像下面这样的格式:
GET / HTTP/1.1
Host: www.weibo.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Upgrade-Insecure-Requests: 1
Cookie: test
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
Connection: keep-alive