Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scraping sites that require login with Python

I use several ad networks for my sites, and to see how much money I made I need to log in to each daily to add up the values. I was thinking of making a Python script that would do this for me to get a quick total. I know I need to do a POST request to log in, then store the cookies that I get back and then GET request the report page while passing in those cookies.

What's the most convenient way to replicate in Python what I'm doing when I browse the sites manually?

like image 670
Bemmu Avatar asked Jun 25 '10 21:06

Bemmu


1 Answers

See if this work for you:

http://stockrt.github.com/p/emulating-a-browser-in-python-with-mechanize/

like image 128
Jeremy Cantrell Avatar answered Oct 19 '22 23:10

Jeremy Cantrell