Any Python alternatives to Selenium for programmatically logging into websites that require JavaScript for login?

后端 未结 6 1066
囚心锁ツ
囚心锁ツ 2020-12-28 18:06

I’m writing a little private app to automatically log into my internet banking every day, and download the latest transactions. I’m writing it as a Django app, so I’m workin

相关标签:
6条回答
  • 2020-12-28 18:25

    Since BeautifulSoup is no longer being actively developed I would recommend lxml since it does all the things that BeautifulSoup can do and a lot more.

    0 讨论(0)
  • 2020-12-28 18:26

    You can also use Spynner, it allows programmatic web browsing.

    0 讨论(0)
  • 2020-12-28 18:30

    You can use Pywebkitgtk. There is a nice tutorial here.

    Alternatively, you can use Beautiful Soup to get the page contents and something like python-spidermonkey to run the scripts.

    0 讨论(0)
  • 2020-12-28 18:31

    Looks like QtWebKit is another option.

    0 讨论(0)
  • 2020-12-28 18:36

    I think a good match for your problem is Twill: a simple scripting language for Web browsing.

    An other one to check is Windmill (a kind of Selenium but all written in Python).

    0 讨论(0)
  • 2020-12-28 18:41

    since you use selenium I think you have already installed firefox. if so get an extension like firebug or tamper data and see what http-requests the javascript code will do while logging in.

    if you have the url and the parameters needed you can easily program a python client with httplib or urllib2.

    in firebug you find the requested urls under "NET". tamper data will be self descriptive. ;-)

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