简体   繁体   中英

Python requests save randomly generated image

I am attempting to use python requests in order to save an image from a webpage. However, the image is randomly generated via php, as shown by the code below, and is different each time. The image is used for a captcha, and changes between each request.

<img src="image.php">

How would I go about properly saving this image?

I think you need to use selenium. If you are trying to write something that can bypass captcha.

How to save an image locally using Python whose URL address I already know?

How to download an image using Selenium (any version)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM