进行Python爬虫时出现报错:[WinError 10061] 由于目标计算机积极拒绝,无法连接。
Traceback (most recent call last):
File "C:\Users\pc\AppData\Roaming\Python\Python39\site-packages\urllib3\connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "C:\Users\pc\AppData\Roaming\Python\Python39\site-packages\urllib3\util\connection.py", line 95, in create_connection
raise err
File "C:\Users\pc\AppData\Roaming\Python\Python39\site-packages\urllib3\util\connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\pc\AppData\Roaming\Python\Python39\site-packages\urllib3\connectionpool.py", line 711, in urlopen
self._prepare_proxy(conn)
File "C:\Users\pc\AppData\Roaming\Python\Python39\site-packages\urllib3\connectionpo