Answer the question
In order to leave comments, you need to log in
How to download an image from a website using python?
You need a code to download a specific image from the site, BUT this is not a direct link to the image. You need to get an image from a div that is in another div, and so on.
https://rand.by/pic
Answer the question
In order to leave comments, you need to log in
[email protected] ~ % http -vv -f POST https://rand.by/ajax.php method=getImage
POST /ajax.php HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 15
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Host: rand.by
User-Agent: HTTPie/2.1.0
method=getImage
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Date: Tue, 12 May 2020 15:27:00 GMT
Server: nginx/1.10.3 (Ubuntu)
Transfer-Encoding: chunked
{
"image": "http://farm66.static.flickr.com/65535/49887294892_1fc5852dd3_b.jpg"
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question