title: Python 3 parse PDF from web
body: <p>I was trying to get a PDF from a webpage, parse it and print the result to the screen using <a href="https://github.com/mstamy2/PyPDF2" rel="nofollow">PyPDF2</a>. I got it working without issues with the following code:</p>
  
  <pre><code>with open("foo.pdf", "wb") as f:
      f.write(requests.get(buildurl(jornal, date, page)).content)
  pdfFileObj = open('foo.pdf', "rb")
  pdf_reader = PyPDF2.PdfFileReader(pdfFileObj)
  page_obj = pdf_reader.getPage(0)
  print(page_obj.extractText())
  </code></pre>
  
  <p>Writing a file just so I can then read it though sounded wasteful, so I figured I'd just cut the middleman with this:</p>
  
  <pre><code>pdf_reader = PyPDF2.PdfFileReader(requests.get(buildurl(jornal, date, page)).content)
  page_obj = pdf_reader.getPage(0)
  print(page_obj.extractText())
  </code></pre>
  
  <p>This, however yields me an <code>AttributeError: 'bytes' object has no attribute 'seek'</code>. How can I feed the PDF coming from <code>requests</code> directly onto PyPDF2?</p>