1

At the moment, I have the following code:

import requests


with open("location.gif", "wb") as f:
    f.write(requests.get(url).content)

This creates the "location.gif" file, but opening the file shows me no image and when trying to send it to someone it tells me it's not a valid file. How should I save the gif?

Martin Gergov
  • 1,556
  • 4
  • 20
  • 29
adisplayname
  • 117
  • 1
  • 10

0 Answers0