错误信息如下
Run python report.py "$USERNAME" "$PASSWORD" -g="$GRADUATING" -k="$API_KEY" -p
2021-10-06 23:08:39,621 - INFO - 非毕业班学生,微信提醒关闭,VPN 开启。
2021-10-06 23:10:48,911 - ERROR - HTTPSConnectionPool(host='xgsm.hitsz.edu.cn', port=443): Max retries exceeded with url: /zhxy-xgzs/xg_mobile/shsj/common (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe9c8a4ab20>: Failed to establish a new connection: [Errno 110] Connection timed out'))
2021-10-06 23:10:48,912 - WARNING - 开启代理,将在 2 秒后重试。
2021-10-06 23:15:13,103 - ERROR - 登陆失败!原因:无可用代理。
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/urllib3/connection.py", line 358, in connect
conn = self._new_conn()
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fe9c8a4ab20>: Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='xgsm.hitsz.edu.cn', port=443): Max retries exceeded with url: /zhxy-xgzs/xg_mobile/shsj/common (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe9c8a4ab20>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/runner/work/HITsz-daily-report/HITsz-daily-report/report.py", line 214, in main
r.student_login()
File "/home/runner/work/HITsz-daily-report/HITsz-daily-report/report.py", line 104, in student_login
response = self.session.get(url_sso, proxies=self.proxies)
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='xgsm.hitsz.edu.cn', port=443): Max retries exceeded with url: /zhxy-xgzs/xg_mobile/shsj/common (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe9c8a4ab20>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/runner/work/HITsz-daily-report/HITsz-daily-report/report.py", line 249, in <module>
main(arguments)
File "/home/runner/work/HITsz-daily-report/HITsz-daily-report/report.py", line 224, in main
r.switch_proxies(r.student_login)
File "/home/runner/work/HITsz-daily-report/HITsz-daily-report/report.py", line 97, in switch_proxies
raise ReportException.LoginError("无可用代理。")
__main__.LoginError: 无可用代理。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/runner/work/HITsz-daily-report/HITsz-daily-report/report.py", line 254, in <module>
raise ReportException(report_msg)
__main__.ReportException: 登陆失败!原因:无可用代理。
Error: Process completed with exit code 1.