freeports_analysis.download

Functions to download pdf from internet and for scraping

Functions

download_pdf(url[, pdf])

Function to download pdf file from url

freeports_analysis.download.download_pdf(url: str, pdf: str = None) BytesIO

Function to download pdf file from url

Parameters:
  • url (str) – unique resource identifier on internet

  • pdf (str) – path of the file where to save the file in filesystem

Returns:

output byte stream with input output operation like file

Return type:

BytesIO

Raises:

Exception – if the code returned from the http get call is an error code, an exception occurs