Proxy Check in python

后端 未结 4 455
既然无缘
既然无缘 2020-12-23 14:55

I have written a script in python that uses cookies and POST/GET. I also included proxy support in my script. However, when one enters a dead proxy, the script crashes. Is t

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 15:31

    I think that the better approach is like dbr said, handling the exception.

    Another solution that could be better in some cases, is to use an external online proxy checker tool to check if a proxy server is alive and then continue using your script without any modification.

提交回复
热议问题