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.

スクレイピングがエラー Selenium×Chrome

Posted at

Selenium スクレイピング、大変便利ですが、Chromeがアップデートするたびに、Chrome↔Selenium 間のドライバを更新する必要があります。

VBAなら


On Error GoTo ErrorHandler
    Dim Driver As New Selenium.WebDriver
    Dim elm As Selenium.WebElement
    Driver.Start "chrome"
    On Error GoTo 0
    ...
    通常の処理
    ...
    
ErrorHandler:

    InputBox Err.Description, "Chromdriverのバージョンエラー 更新しよう!", "https://chromedriver.chromium.org/downloads"
    
    InputBox "chromedriver.exe を上書きします。場所はこちら", "chromedriver.exeの場所", "C:\Program Files\SeleniumBasic"    
    
    On Error GoTo 0

こんな感じかな。
https://chromedriver.chromium.org/downloads
バージョン115以降でJSONエンドポイントを配信してくれているので、もうちょっとゴニョゴニョしたら使いやすくなるかもね。

0
0
0

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?