title: Parse online PDF file with Python and PDFMiner
body: <p>How can I parse an online PDF file with Python?</p>
  
  <p>I just need the second line of the first page. I need to do this without downloading the file and I am using Python 3.5 </p>
  
  <p>I have tried something like this, but it didnt work: <a href="https://stackoverflow.com/questions/22429193/using-pdfminer-python-with-online-pdf-files-encode-the-url">Using PDFMiner (Python) with online pdf files. Encode the url?</a></p>
  
  <pre><code>from pdfminer.pdfparser import PDFParser
  import urllib.request
  from io import StringIO
  import io
  
  url = 'url_with_the_pdf'
  
  open = urllib.request.urlopen(url).read()
  
  memoryFile = io.StringIO(open)
  
  parser = PDFParser(memoryFile)
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>memoryFile = io.StringIO(open) TypeError: initial_value must be str or None, 
  not bytes
  </code></pre>