title: Getting form "action" from BeautifulSoup result
body: <p>I'm coding a Python parser for a website to do some job automatically but I'm not much into "re" module (regex) for Py and can't make it work.</p>
  
  <pre><code>req = urllib2.Request(tl2)
  req.add_unredirected_header('User-Agent', ua)
  response = urllib2.urlopen(req)
  try:
      html = response.read()
  except urllib2.URLError, e:
      print "Error while reading data. Are you connected to the interwebz?!", e
  
  soup = BeautifulSoup.BeautifulSoup(html)
  form = soup.find('form', id='form_product_page')
  pret = form.prettify()
  
  print pret
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>&lt;form id="form_product_page" name="form_1362737440" action="/download/791055/164084/" method="get"&gt;
  &lt;input id="nojssubmit" type="submit" value="Download" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Indeed that code is done, just what I need for start. Now, I'm wondering on which way should I extract "action" attribute from "form" tag. That is only what I need from BeautifulSoup response.</p>
  
  <p>I've tried using <code>form = soup.find('form', id='form_product_page').parent.get('action')</code> but result was 'None'. What I want to extract is for example "/download/791055/164084/". This is different on every URL from link.</p>
  
  <p><hr />
  Variables (example):<br>
  tl2 = <a href="http://example.com" rel="noreferrer">http://example.com</a><br>
  ua = Mozilla Firefox / 14.04</p>