Open oopsg1thub opened 4 years ago
现在还会遇到吗? 用浏览器直接访问有问题? 有没有用代理之类的?
您好,是的,用校内网访问频次过高,持续一段时间后就会出现该问题,然后该电脑就无法访问elective,门户等均正常访问。只有断wifi断开全部连接重连才可重新访问。后挂国内、外科学测试,则一直不会被封。因此猜测只有校内频繁访问的ip会被封,这个问题可能在您的程序上不太好解决(自行查的python爬虫被封的解决方案有keep alive 改close 和扩大user agent 池等,但本人水平十分有限,不了解)
---Original--- From: "Rabbit"<notifications@github.com> Date: Tue, Sep 22, 2020 10:20 AM To: "zhongxinghong/PKUAutoElective"<PKUAutoElective@noreply.github.com>; Cc: "oopsg1thub"<1239270374@qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [zhongxinghong/PKUAutoElective] Max retries exceeded with url,Connection to elective.pku.edu.cn timed out (#43)
现在还会遇到吗? 用浏览器直接访问有问题? 有没有用代理之类的?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
这其实我有察觉到,选课网近期有 IP 级别的限流,好像还是在应用层以下的限流,至于是否只对校内 IP 限流我目前还不是很清楚,但是更换一下 IP 似乎就可以继续用了
是的,校内被封频率的阈值还有待我测试,目前似乎只能用校外ip挂机。与程序无涉,感谢!
---Original--- From: "Rabbit"<notifications@github.com> Date: Tue, Sep 22, 2020 11:06 AM To: "zhongxinghong/PKUAutoElective"<PKUAutoElective@noreply.github.com>; Cc: "oopsg1thub"<1239270374@qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [zhongxinghong/PKUAutoElective] Max retries exceeded with url,Connection to elective.pku.edu.cn timed out (#43)
这其实我有察觉到,选课网近期有 IP 级别的限流,好像还是在应用层以下的限流,至于是否只对校内 IP 限流我目前还不是很清楚,但是更换一下 IP 似乎就可以继续用了
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Check List
Version / Environment
System infomation: [ ] ( Windows10 64bit ... ) Python version: [ ] ( run
python3 --version
) AutoElective version: [ ] ( runpython3 main.py --version
)Config
除了学号/密码外的其他配置
Issue Description
What
遇到的问题
开启一段时间后,逐渐出现Max retries exceeded with url...错误,猜测requests高频率访问访问同一个ip而出现。出现后浏览器都打不开elective,其他网站正常。只能断开WIFI断开its所有连接并重连(猜测ip被禁,需要重连更换)。不知是否个案。
Console Log
[ERROR] loop.error, 20:39:47, HTTPSConnectionPool(host='elective.pku.edu.cn', port=443): Max retries exceeded with url: /elective2008/edu/pku/stu/elective/controller/supplement/SupplyCancel.do (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x000002E282DE68E0>, 'Connection to elective.pku.edu.cn timed out. (connect timeout=20.0)'))
其中,重复出现的错误信息一般“0x0...”部分不同
必要的终端输出信息
Reproduce
如有必要,提供复现的步骤