Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exp10it.py中requests请求cn.bing.com报错 #9

Open
freedom-wy opened this issue Feb 9, 2022 · 0 comments
Open

exp10it.py中requests请求cn.bing.com报错 #9

freedom-wy opened this issue Feb 9, 2022 · 0 comments

Comments

@freedom-wy
Copy link

报错位置
Traceback (most recent call last): File "/root/xcdn/xcdn.py", line 296, in <module> Xcdn(domain) File "/root/xcdn/xcdn.py", line 66, in __init__ self.http_or_https=get_http_or_https(self.domain) File "/usr/local/lib/python3.9/dist-packages/exp10it.py", line 4361, in get_http_or_https bing_record = get_http_or_https_from_search_engine(domain) File "/usr/local/lib/python3.9/dist-packages/exp10it.py", line 4332, in get_http_or_https_from_search_engine urls_list = collect_urls_from_url(url)['y1'] File "/usr/local/lib/python3.9/dist-packages/exp10it.py", line 4193, in collect_urls_from_url rsp = requests.get(url,timeout=30,verify=False) File "/usr/lib/python3/dist-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 504, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='cn.bing.com', port=80): Max retries exceeded with url: /search?q=site:www.yase.me (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f6c5fd6dac0>, 'Connection to cn.bing.com timed out. (connect timeout=30)'))

将4330行的url的http修改为https即可
"https://cn.bing.com/search?q="

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant