I am wishing to extract the content of pdf files available online using PDFMiner
.
My code is based on the one available in the documentation used to ext
Well, I finally found out a solution,
I resorted on Request
and StringIO
and got rid off the open('my_file', 'rd')
command
from urllib2 import Request
from StringIO import StringIO
url = 'my_url'
open = urllib2.urlopen(Request(url)).read()
memoryFile = StringIO(open)
parser = PDFParser(memoryFile)
That way Python considers the url as a file (to say so).