Last active
May 14, 2020 06:09
-
-
Save narendraprasath/1e8381bc991a17dcc00d36780430e0e2 to your computer and use it in GitHub Desktop.
This file contains 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
## The data is taken from https://www.un.org/sites/un2.un.org/files/new_dhmosh_covid-19_faq.pdf | |
## it has FAQ based question and answering for COVID-19 | |
def download_pdf_url(dataset_url, file_name): | |
response = requests.get(dataset_url) | |
pdf_content_output = None | |
with io.BytesIO(response.content) as open_pdf_file: | |
with open(file_name,'w') as obj: | |
obj.write(str(open_pdf_file)) | |
dataset_url = 'https://www.un.org/sites/un2.un.org/files/new_dhmosh_covid-19_faq.pdf' | |
## download pdf from URL and save the pdf file | |
download_pdf_url(dataset_url, 'new_dhmosh_covid-19_faq.pdf') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment