第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

webdriver.chrome() TypeError: 'module' object is

webdriver.chrome() TypeError: 'module' object is

LEATH 2022-09-06 15:59:28
我正在python3中開發(fā)亞馬遜網(wǎng)絡(luò)抓取腳本,所以我使用了硒,但我得到了這個(gè)調(diào)試webdriver.chrome()TypeError: 'module' object is not callable 我看到了更改的解決方案(鉻到鉻),但我也有這個(gè)調(diào)試FileNotFoundError: [WinError 2] The system cannot find the file specified這是我的代碼# -*- coding: utf-8 -*-import requestsfrom bs4 import BeautifulSoupfrom selenium import webdriverdriver = webdriver.chrome()driver.get('https://www.amazon.com/international-sales-offers/b/?ie=UTF8&node=15529609011&ref_=nav_navm_intl_deal_btn')res = driver.execute_script("return document.documentElement.outerHTML")driver.quit()soup = BeautifulSoup(res , 'lxml')box= soup.find('div',{'class':'a-row padCenterContainer widgetBorder'})products=box.find_all('div',{'class':'a-section a-spacing-none tallCellView gridColumn5 singleCell'})for details in products:    name= details.find('span',{'class':'a-declarative'}).text    link= details.find('a',{'class':'a-size-base a-link-normal dealTitleTwoLine singleCellTitle autoHeight'}).get('href')    print(name,link)
查看完整描述

1 回答

?
開滿天機(jī)

TA貢獻(xiàn)1786條經(jīng)驗(yàn) 獲得超13個(gè)贊

我相信它應(yīng)該是,而不是。嘗試:Chrome()chrome()


from selenium import webdriver


driver = webdriver.Chrome()

您也可以將路徑傳遞給Chromedriver,將executable_path設(shè)置為chromedriver所在的位置(路徑,或者,對于非Windows用戶,它只稱為):chromedriver.exechromedriver


driver = webdriver.Chrome(executable_path='C:/path/to/chromedriver.exe')


查看完整回答
反對 回復(fù) 2022-09-06
  • 1 回答
  • 0 關(guān)注
  • 189 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號