Created
July 21, 2017 08:54
-
-
Save jboynyc/085700bb06d253477c7483a6373cb929 to your computer and use it in GitHub Desktop.
Give Me Text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def pdf_to_text(pdf_file): | |
''' | |
See http://givemetext.okfnlabs.org/#api for a description of the API. | |
''' | |
r = requests.put('http://beta.offenedaten.de:9998/tika', open(pdf_file, 'rb')) | |
r.raise_for_status() | |
r.encoding = 'utf-8' | |
return r.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment