title: Follow a javascript link with mechanize and python
body: <p>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.</p>
  
  <p>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:</p>
  
  <pre><code>for Auth in iterAuths:
       Auth = str(Auth.contents[0]).strip()
       br.find_link(text=Auth)
  </code></pre>
  
  <p>now if I do <code>br.follow_link(text=Auth)</code>, I get an error <code>urllib2.URLError: &lt;urlopen error unknown url type: javascript&gt;</code>. </p>
  
  <p>If I do <code>print br.click_link(text=Auth')</code>, it prints as <code>Request for javascript:SendThePage('5660')</code></p>
  
  <p>I just need to get through the javascript link. Can anyone help?</p>