title: How to get pdf filename with Python requests?
body: <p>I'm using the Python <a href="http://docs.python-requests.org/en/latest/" rel="nofollow noreferrer">requests</a> library to get a PDF file from the web. This works fine, but I now also want the original filename. If I go to a PDF file in Firefox and click <code>download</code> it already has a filename defined to save the pdf. How do I get this filename?</p>
  <p>For example:</p>
  <pre><code>import requests
  r = requests.get('http://www.researchgate.net/profile/M_Gotic/publication/260197848_Mater_Sci_Eng_B47_%281997%29_33/links/0c9605301e48beda0f000000.pdf')
  print r.headers['content-type']  # prints 'application/pdf'
  </code></pre>
  <p>I checked the <code>r.headers</code> for anything interesting, but there's no filename in there. I was actually hoping for something like <code>r.filename</code>..</p>
  <p>Does anybody know how I can get the filename of a downloaded PDF file with the requests library?</p>