Files
004_comission/vinniesniper-54816/task1/project/poc/003-crawler/crawler_mountain.py
louiscklaw 5833d552e9 update,
2025-01-31 22:33:28 +08:00

12 lines
515 B
Python

from icrawler.builtin import BingImageCrawler
# we are building cats image detection that's why we put cat here
# if you want some other images then put that name in classes list
classes = ["mountain"]
number = 99999
# here root directory is find your root directory there u will find
# new file name data in which all images are saved.
for c in classes:
bing_crawler = BingImageCrawler(storage={"root_dir": f'p/{c.replace(" ",".")}'})
bing_crawler.crawl(keyword=c, filters=None, max_num=number, offset=0)