I do some web scraping, and the project is almost complete, except that I need to click the javascript link and I canβt figure out how to mechanize with Python.
A list of javascript links appears on one of the pages, and I want to follow them one by one, clear some data and repeat. I know mechanization doesn't work with javascript, but does anyone know a workaround? Here is the code I use to highlight 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 the 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 go through the javascript link. Can anyone help?
source share