Вот мои настройки:
Код: Выделить всё
1. Environment:
• Python version: (e.g., Python 3.10)
• iCrawler version: (e.g., 0.6.5)
2. Code Snippet:
Код: Выделить всё
from icrawler.builtin import GoogleImageCrawler, BingImageCrawler
def download_images(search_term, num_images, source_choice, size, file_type, download_folder):
if source_choice == '1': # Google
crawler = GoogleImageCrawler(storage={'root_dir': download_folder})
elif source_choice == '2': # Bing
crawler = BingImageCrawler(storage={'root_dir': download_folder})
filters = {'size': size, 'type': file_type}
# Start crawling
crawler.crawl(keyword=search_term, max_num=num_images, filters=filters)
Код: Выделить всё
3. Inputs:
• Search Term: “example”
• Number of Images: 10
• Source: Google
• Size: “large”
• File Type: “photo”
4. What Works:
• When using BingImageCrawler, the correct number of images are downloaded.
• GoogleImageCrawler does successfully download 1 image but stops.
5. What I’ve Tried:
• Verified the filters parameter matches the documentation.
• Tested with different max_num values (e.g., 5, 10, 20).
• Checked the Google terms of service to ensure I’m not hitting API rate limits or bot detection.
• Verified that the download_folder is writable and has sufficient space.
6. Questions:
• Is there a limitation or known issue with GoogleImageCrawler when handling larger batches of images?
• Could this be caused by Google’s bot detection system?
• Are there specific debugging steps I can take to trace why only 1 image is downloaded?k
Я попробовал использовать GoogleImageCrawler с определенными фильтрами (размер, тип файла) и установил max_num для загрузки нескольких изображений. Я ожидал, что он загрузит запрошенное количество изображений (например, 10), но он загружает только 1 изображение независимо от указанного max_num.
Подробнее здесь: https://stackoverflow.com/questions/792 ... -fine-in-i
Мобильная версия