こちらのページを参考にスクレイピングを行いたいのですが、
(https://kei01011.hatenablog.com/entry/2021/06/18/130736)
dataNum = driver.find_element_by_class_name('allDataNum')
ここで以下エラーが出てしまいます
'WebDriver' object has no attribute 'find_element_by_class_name'
その為書き方を変えてみましたがまた別のエラーが表示されました
dataNum = driver.find_element(By.className("allDataNum"));
↓
エラー:name 'By' is not defined
他に書き方がある、または別に原因があればご教示いただけますでしょうか
回答1件
あなたの回答
tips
プレビュー