Chromedriver在从某个si获取数据时行为怪异

2024-04-25 02:00:29 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经用python和selenium联合编写了一个脚本来解析网站上的前100个名字。当我运行脚本时,我得到一个弹出框作为通知/警告。你知道吗

What might be the issue here as I've been using the same approach quite some time without any issues in different sites?

website url

from selenium import webdriver

def collect_names(driver,link):
    driver.get(link)
    for item in driver.find_elements_by_css_selector(".topcolumn h2"):
        print(item.text)

if __name__ == '__main__':
    url = "https://propertyspark.com/top-100-real-estate-teams-on-social-media-in-2018/"
    driver = webdriver.Chrome()
    collect_names(driver,url)
    driver.quit()

弹出框: enter image description here

以下是问题签名:

  Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: chromedriver.exe
  Application Version:  0.0.0.0
  Application Timestamp:    5a9904fa
  Fault Module Name:    chromedriver.exe
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   5a9904fa
  Exception Code:   c0000005
  Exception Offset: 0003c586
  OS Version:   6.1.7601.2.1.0.256.1
  Locale ID:    1033
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

Tags: thenamein脚本urlinformationapplicationversion
1条回答
网友
1楼 · 发布于 2024-04-25 02:00:29

你最近好像升级了你的浏览器,所以你也需要升级你的浏览器驱动程序.exe为了兼容性。你知道吗

chromedriver    chrome
   2.46            71-73
   2.45            70-72
   2.44            69-71
   2.43            69-71
   2.42            68-70
   2.41            67-69
   2.40            66-68
   2.39            66-68
   2.38            65-67
   2.37            64-66
   2.36            63-65
   2.35            62-64
   2.34            61-63
   2.33            60-62    
   2.28            57
   2.25            54
   2.24            53
   2.22            51
   2.19            44
   2.15            42

Download chrome Driver exe

相关问题 更多 >