You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code would normally work for other images but for this specific image URL it doesn't. The image is downloaded but the file is corrupt.
url="https://i.discogs.com/UzkDSQACNmbykQvWO0B9JGVajps7_MULzdwP9RK-o94/rs:fit/g:sm/q:90/h:591/w:589/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9MLTk3NzE1/LTE2MjA2NjkwNzQt/MjMxMS5qcGVn.jpeg"# doesn't work with requestsimportrequests# 2.28.1img_data=requests.get(url).contentwithopen('image_requests.jpeg', 'wb') ashandler:
handler.write(img_data)
# it works with urllibimporturlliburllib.request.urlretrieve(url, "image_urllib.jpeg")
Result:
We can see the requests one doesn't have a preview and doesn't have the same size.
Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use StackOverflow for general usage questions instead and only report defects here.
This code would normally work for other images but for this specific image URL it doesn't. The image is downloaded but the file is corrupt.
Result:
We can see the
requests
one doesn't have a preview and doesn't have the same size.Here are other examples:
The text was updated successfully, but these errors were encountered: