Scraping sites that require login with Python

前端 未结 3 2379
眼角桃花
眼角桃花 2021-02-06 06:46

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

相关标签:
3条回答
  • 2021-02-06 06:50

    cookielib does client-side cookie handling, and mechanize enhances it in several ways -- including a way to initialize a cookie jar by reading the cookies from an Internet Explorer cache (so, if you can log in manually once to each site on Windows, you can then use cookielib or mechanize for future logins based on exactly the same cookies -- until they expire of course).

    0 讨论(0)
  • 2021-02-06 07:17

    See if this work for you:

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

    0 讨论(0)
  • 2021-02-06 07:17

    not a Python solution, but consider using a browser automation tool like Chickenfoot.

    0 讨论(0)
提交回复
热议问题