A simple and efficient Python script to scrape images from Baidu Image Search based on a specified keyword. The script supports downloading large amounts of images while avoiding anti-crawler mechanisms.
- Download images from Baidu Image Search by keyword
- Specify the number of images to download
- Multi-threaded downloading for faster performance
- Automatically avoids anti-crawler mechanisms
- Randomized user agent and delays between requests
- Python 3.x
requests
fake_useragent
- Clone this repository:
git clone https://github.com/yourusername/baidu-image-crawler.git
- Install the required packages:
pip install -r requirements.txt
- Usage
python baidu_image_crawler.py
Modify the keyword and num_images variables in the script to specify the keyword for image search and the number of images to download.
Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License MIT