Using mechanize with python, logging in to the wsj.com -


it feels have tried i'm hoping out there able help. trying automate log-in wall street journal (wsj.com). have tried code on various other sites , worked fine. not seem logging me in wsj. below code, appreciate light shed why isn't working , how fix it. assume has submit control being set disabled , readonly. not control change.

import urllib2 bs4 import beautifulsoup import cookielib import urllib import requests import mechanize  # log-in wsj.com cj = mechanize.cookiejar() br = mechanize.browser() br.set_cookiejar(cj)   # browser options br.set_handle_equiv(true) br.set_handle_gzip(true) br.set_handle_redirect(true) br.set_handle_referer(true) br.set_handle_robots(false) br.set_handle_refresh(false)    # site navigate into, handling it's session br.open('https://id.wsj.com/access/pages/wsj/us/login_standalone.html?mg=id-wsj')  # select first (index zero) form br.select_form(nr=0)  # user credentials br.form['username'] = '****' br.form['password'] = '****'   # login br.submit()  


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -