実現したいこと
google Chromeを自動で起動させる
前提
【Webスクレイピング超入門】2時間で基礎を完全マスター!PythonによるWebスクレイピング入門 連結版という動画(youtube)を見て、google colaboratory を用い、selenium、ChromeDriverをインストールした後、google Chromeを自動で起動させるためのコードを記述しましたが、エラーが出て、自動で起動させることができませんでした(動画前半10分ごろまでの内容)。エラーの原因が何なのか、教えて頂けますと幸いです。よろしくお願いいたします。
発生している問題・エラーメッセージ
AttributeError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/common/driver_finder.py in get_path(service, options)
37 try:
---> 38 path = SeleniumManager().driver_location(options) if path is None else path
39 except Exception as err:
4 frames
AttributeError: 'str' object has no attribute 'capabilities'
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/common/driver_finder.py in get_path(service, options)
38 path = SeleniumManager().driver_location(options) if path is None else path
39 except Exception as err:
---> 40 msg = f"Unable to obtain driver for {options.capabilities['browserName']} using Selenium Manager."
41 raise NoSuchDriverException(msg) from err
42
AttributeError: 'str' object has no attribute 'capabilities'
該当のソースコード
python
1browser=webdriver.Chrome('/content/chromedriver.exe')
試したこと
コードの記述間違いがないか、ダウンロードしたChromeDriverが作業フォルダに入っているか確認しましたが、改善されませんでした。
補足情報(FW/ツールのバージョンなど)
pcのos: windows8.1
ダウンロードしたChromeDriverのバージョン: ChromeDriver 109.0.5414.74
現在使用しているChromeのバージョン: 109.0.5414.168(Official Build) (64 ビット)
記述した全体のコード
!pip install selenium
from selenium import webdriver
from time import sleep
browser=webdriver.Chrome('/content/chromedriver.exe')←ここでエラーが発生しました。

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。