Fake a cookie to scrape a site in python
问题 The site that I'm trying to scrape uses js to create a cookie. What I was thinking was that I can create a cookie in python and then use that cookie to scrape the site. However, I don't know any way of doing that. Does anybody have any ideas? 回答1: Please see Python httplib2 - Handling Cookies in HTTP Form Posts for an example of adding a cookie to a request. I often need to automate tasks in web based applications. I like to do this at the protocol level by simulating a real user's