0

I have a bunch of files like this that I have to download. I already have a code that allowed me to download a bunch of pdfs in other websites using direct links but not here. This is the code:

def download(url, file_name):
    get_response = requests.get(url,stream=True,verify=False)
    with open(file_name, 'wb') as f:
        for chunk in get_response.iter_content(chunk_size=1024):
            if chunk:
                f.write(chunk)
    return file_name

If I use this on the link above I get an empty file. How can I download this embedded pdf from google drive?

Atirag
  • 1,660
  • 7
  • 32
  • 60
  • possible duplicate of [this](https://stackoverflow.com/questions/38511444/python-download-files-from-google-drive-using-url) – ozerodb Apr 04 '22 at 21:11
  • @KJ But then where in the source code of the page is the pdf to download? I looked everywhere and couldn't find it – Atirag Apr 04 '22 at 22:39

0 Answers0