Hi I want to download an image in this link,
but I can't open the created image. This is the output file
How can I solve this?
This is the code:
from requests.models import Response
import requests
url = 'https://beta.mangaeden.com/it/it-manga/jojo-no-kimyou-na-bouken---jojorion/1/1'
r = requests.get(url)
soup = BeautifulSoup(r.content, 'html.parser')
immagine = soup.find(id='mainImg')
src = str(immagine.get('src'))
link_immagine = "https:"+src
print(link_immagine)
'''download imagege'''
response = requests.get(link_immagine)
f = open("C:\\Users\\chris\\Desktop\\image.jpg", "wb")
f.write(response.content)
f.close()
print('download successfull')