0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Python】Seleniumでダウンロード先のフォルダを指定する方法

Last updated at Posted at 2023-06-26

バックスラッシュでpathを指定する

(なぜかスラッシュ(/)だとうまくいかない)

example.py
    # ダウンロード先のフォルダを指定する
    option = webdriver.ChromeOptions()
    option.add_experimental_option("prefs", {
        "download.default_directory":"hogehoge\\fugafuga\\piyopiyo"
    })

    # webドライバーの更新、新ウィンドウの展開
    driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=option)
0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?