I'm doing some web scraping and the project is almost done, except for I need to click a javascript link and I can't work out how to with Python and mechanize.
On one of the pages, a list of javascript links appear and I want to follow them in turn, scrape some data, and repeat. I know mechanize doesn't work with javascript but does anyone know a workaround? Here's the code I use to isolate the links:
for Auth in iterAuths:
Auth = str(Auth.contents[0]).strip()
br.find_link(text=Auth)
now if I do br.follow_link(text=Auth), I get an error urllib2.URLError: <urlopen error unknown url type: javascript>.
If I do print br.click_link(text=Auth'), it prints as Request for javascript:SendThePage('5660')
I just need to get through the javascript link. Can anyone help?