<jupyter_start><jupyter_text><jupyter_code>!pip install icrawler
from icrawler.builtin import BingImageCrawler
import os
import shutil

# 検出する画像
golfer_lists = {'渋野日向子': 'shibuno', '小祝さくら': 'koiwai', '原英莉花': 'hara'}

Mydribe = "/content/drive/My Drive/ColabData"

# フォルダの作成
os.makedirs(Mydribe + '/origin_image', exist_ok=True)

# keyに検索用の名前、valueはフォルダ名
for key, value in golfer_lists.items():
    # 取得した画像の保存先を指定
    crawler = BingImageCrawler(storage={'root_dir': value})
    # キーワードと取得枚数を指定
    crawler.crawl(keyword=key, max_num=10)
    # フォルダを移動
    path = os.path.join('./', value)
    shutil.move(path, Mydribe + '/origin_image/')<jupyter_output>2020-08-18 03:23:54,344 - INFO - icrawler.crawler - start crawling...
2020-08-18 03:23:54,345 - INFO - icrawler.crawler - starting 1 feeder threads...
2020-08-18 03:23:54,351 - INFO - feeder - thread feeder-001 exit
2020-08-18 03:23:54,351 - INFO - icrawler.crawler - starting 1 parser threads...
2020-08-18 03:23:54,359 - INFO - icrawler.crawler - starting 1 downloader threads...
2020-08-18 03:23:54,628 - INFO - parser - parsing result page https://www.bing.com/images/async?q=渋野日向子&first=0
2020-08-18 03:23:55,801 - INFO - downloader - image #1	https://s.eximg.jp/exnews/feed/ALBA/ALBA_129695_12fe.jpg
2020-08-18 03:23:56,393 - ERROR - downloader - Response status code 403, file https://hochi.news/images/2019/08/06/20190806-OHT1I50037-L.jpg
2020-08-18 03:23:57,215 - INFO - downloader - image #2	https://i.gimg.jp/cmsimg/191633.jpg
2020-08-18 03:23:57,438 - INFO - downloader - image #3	https://samidareshiki.com/wp-content/uploads/2019/08/shibunohinako1.jpg
2020-08-18 03:23:57,836 - INFO - do[...]
{'fraction_non_alphanumeric': 0.15500603136308805, 'fraction_numerical': 0.1477683956574186, 'mean_word_length': 3.967065868263473, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 5, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '258658', 'license': 'Unlicense', 'n_tokens_mistral': 876, 'n_tokens_neox': 718, 'n_words': 125, 'path': 'getgolf.ipynb', 'repo_name': 'Gw0496/Chainer-Slack-Twitter-Dialogue', 'size': '1658'}