title: Download PDF from PeerJ
body: <p>I am trying to use Python <code>requests</code> to download a PDF from <a href="https://peerj.com" rel="nofollow noreferrer">PeerJ</a>. For example, <a href="https://peerj.com/articles/1.pdf" rel="nofollow noreferrer">https://peerj.com/articles/1.pdf</a>.</p>
  <p>My code is simply:</p>
  <pre><code>r = requests.get('https://peerj.com/articles/1.pdf')
  </code></pre>
  <p>However, the <code>Response</code> object returned displays as <code>&lt;Response [432]&gt;</code>, which indicates an HTTP 432 error. As far as I know, that error code is not assigned.</p>
  <p>When I examine <code>r.text</code> or <code>r.content</code>, there is some HTML which says that it's an error 432 and gives a link to the same PDF, <a href="https://peerj.com/articles/1.pdf" rel="nofollow noreferrer">https://peerj.com/articles/1.pdf</a>.</p>
  <p>I can view the PDF when I open it in my browser (Chrome).</p>
  <p>How do I get the actual PDF (as a <code>bytes</code> object, like I should get from <code>r.content</code>)?</p>