Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Selenium在将webdriverwait函数添加到加载href页面时拒绝连接_Python_Selenium_Webdriver_Webdriverwait - Fatal编程技术网

Python Selenium在将webdriverwait函数添加到加载href页面时拒绝连接

Python Selenium在将webdriverwait函数添加到加载href页面时拒绝连接,python,selenium,webdriver,webdriverwait,Python,Selenium,Webdriver,Webdriverwait,在向webscraping添加WebDriverWait函数时,我遇到了“连接被拒绝”错误 关于这个问题,我在网上查看了不同的帖子,但是人们有很多不同类型的问题,我没有遇到一个对我有帮助的问题 以下是在我的程序中添加的代码,它会导致我的问题。如果没有它,我的chrome webdriver将加载,并且我能够从当前网页中获取信息。下面代码中的标记有一个不寻常的类名,但它所做的是链接到另一个包含我需要的信息的网页。我的Web驱动程序无法访问该页面。类是正确的,标记名也是正确的(包含href) 下面是

在向webscraping添加WebDriverWait函数时,我遇到了“连接被拒绝”错误

关于这个问题,我在网上查看了不同的帖子,但是人们有很多不同类型的问题,我没有遇到一个对我有帮助的问题

以下是在我的程序中添加的代码,它会导致我的问题。如果没有它,我的chrome webdriver将加载,并且我能够从当前网页中获取信息。下面代码中的标记有一个不寻常的类名,但它所做的是链接到另一个包含我需要的信息的网页。我的Web驱动程序无法访问该页面。类是正确的,标记名也是正确的(包含href)

下面是它导致的错误

ConnectionRefusedError                    Traceback (most recent call last)
c:\users\misha\appdata\local\programs\python\python37\lib\site-packages\urllib3\connection.py in _new_conn(self)
    159             conn = connection.create_connection(
--> 160                 (self._dns_host, self.port), self.timeout, **extra_kw)

ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000001C37CF0F9B0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it
ConnectionRefusedError回溯(最近一次调用上次)
c:\users\misha\appdata\local\programs\python37\lib\site packages\urllib3\connection.py in\u new\u conn(self)
159 conn=连接。创建连接(
-->160(self.\u dns\u主机、self.port)、self.timeout、**额外功率)
ConnectionRefusedError:[WinError 10061]无法建立连接,因为目标计算机主动拒绝了它
NewConnectionError::未能建立新连接:[WinError 10061]无法建立任何连接,因为目标计算机主动拒绝该连接

Oh我也将预期的_条件作为ECOh导入,也将预期的_条件作为EC导入
ConnectionRefusedError                    Traceback (most recent call last)
c:\users\misha\appdata\local\programs\python\python37\lib\site-packages\urllib3\connection.py in _new_conn(self)
    159             conn = connection.create_connection(
--> 160                 (self._dns_host, self.port), self.timeout, **extra_kw)

ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000001C37CF0F9B0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it