R
R
rkfddf2020-06-06 12:40:59
Python
rkfddf, 2020-06-06 12:40:59

How to catch ConnectionRefusedError: [WinError 10061]?

While parsing (Selenium, Python) some pages get an error

ConnectionRefusedError: [WinError 10061] Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение
and accordingly the driver stops working.
How can I catch the error and continue execution by skipping this page?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Pankov, 2020-06-06
@trapwalker

try:
    # ... код, порождающий ошибку
except ConnectionRefusedError as e:
    # код обработки ошибки

D
Dr. Bacon, 2020-06-06
@bacon

https://docs.python.org/3/tutorial/errors.html#han...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question