#利用するライブラリ(モジュール)をインポート import requests from time import sleep from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from bs4 import BeautifulSoup import os #google画像検索にアクセス options = webdriver.ChromeOptions() options.add_argument("--headless") browser = webdriver.Chrome(ChromeDriverManager().install(),options=options) url = "https://www.google.co.jp/imghp?hl=ja"
![【Pythonスクレイピング】Google画像検索から画像を自動保存してみた【コピペOK】](https://cdn-ak-scissors.b.st-hatena.com/image/square/4c5631bbabee6fc94ee65cab38e20e802f67c4b8/height=288;version=1;width=512/https%3A%2F%2Fpepenoheya.blog%2Fwp-content%2Fuploads%2F2022%2F02%2F00c3aad471413aaa5727adcb05ade3a4-1.jpg)