import requests
img_url = 'http://markof.fun/im/1.png'
r = requests.get(img_url)
out = open('d:/o/temp.png', "wb")
out.write(r.content)
out.close()
import requests
img_url = 'http://markof.fun/im/1.png'
headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36'}
r = requests.get(img_url, headers=headers)
if r.status_code == 200:
with open('temp.png', 'wb') as f:
f.write(r.content)
else:
print('Error', r.status_code)