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

即使把所有的链接改为 https,仍会爆出下面的错误,如何解决呢? #31

Open
YuXiang-ZhuanSun opened this issue Apr 30, 2021 · 1 comment

Comments

@YuXiang-ZhuanSun
Copy link

即使把所有的链接改为 https,仍会爆出下面的错误,如何解决呢?

D:\chromedownloads\CNKI-download-master\CNKI-download-master>python main.py
--------------------------
|                         |
| 请选择检索条件:(可多选)           |
|(a)主题   (b)关键词   (c)篇名   |
|(d)摘要   (e)全文    (f)被引文献 |
|(g)中图分类号                 |
|                         |
--------------------------
请选择(以空格分割,如a c):a
--------------------------
您选择的是:
主题 |
--------------------------
请输入【主题】:asdf
--------------------------
是否需要规定文献来源(y/n)?y
输入文献来源期刊名称:
正在检索中.....
--------------------------
检索到4条结果,全部下载大约需要00小时00分钟20秒。
是否要全部下载(y/n)?y
正在下载: 中信:决战澳矿.caj
Traceback (most recent call last):
File "D:\Users\18301\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
chunked=chunked)
File "D:\Users\18301\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "D:\Users\18301\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
conn.connect()
File "D:\Users\18301\anaconda3\lib\site-packages\urllib3\connection.py", line 364, in connect
_match_hostname(cert, self.assert_hostname or server_hostname)
File "D:\Users\18301\anaconda3\lib\site-packages\urllib3\connection.py", line 374, in _match_hostname
match_hostname(cert, asserted_hostname)
File "D:\Users\18301\anaconda3\lib\ssl.py", line 334, in match_hostname
% (hostname, ', '.join(map(repr, dnsnames))))
ssl.SSLCertVerificationError: ("hostname 'i.shufang.cnki.net' doesn't match either of '.cnki.net', 'www.cnki.net', '.global.cnki.net', '*.oversea.cnki.net', 'big5.book.oversea.cnki.net', 'caj.d.cnki.net', 'caj.oversea.d.cnki.net', 'en.cend.cnki.net', 'eng.tcm.cnki.net', 'gb.book.oversea.cnki.net', 'gb.cend.cnki.net', 'gb.cnbar.cnki.net', 'gb.obaor.cnki.net', 'gb.sczlmz.cnki.net', 'gb.sczlzj.cnki.net', 'gb.tcm.cnki.net', 'kb.tcm.cnki.net', 'oversea.d.cnki.net', 'pdf.d.cnki.net', 'pdf.oversea.d.cnki.net', 'tra.tcm.cnki.net', 'cnki.net'",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Users\18301\anaconda3\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "D:\Users\18301\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "D:\Users\18301\anaconda3\lib\site-packages\urllib3\util\retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='i.shufang.cnki.net', port=443): Max retries exceeded with url: /KRS/KRSWriteHandler.ashx?curUrl=detail.aspx%3FdbCode%3DCJFQ%26fileName%3DJJDK202009024&referUrl=https%3A%2F%2Fkns.cnki.net%2Fkns%2Fbrief%2Fbrief.aspx%3Fpagename%3DASP.brief_default_result_aspx%26isinEn%3D1%26dbPrefix%3DSCDB%26dbCatalog%3D%25e4%25b8%25ad%25e5%259b%25bd%25e5%25ad%25a6%25e6%259c%25af%25e6%259c%259f%25e5%2588%258a%25e7%25bd%2591%25e7%25bb%259c%25e5%2587%25ba%25e7%2589%2588%25e6%2580%25bb%25e5%25ba%2593%26ConfigFile%3DCJFQ.xml%26research%3Doff%26t%3D1544249384932%26keyValue%3D%25E6%259B%25BE%25E6%2599%25A8%26S%3D1%26sorttype%3D%23J_ORDER%26&cnkiUserKey=199bceef-d913-a550-9ff0-b5614a82b64&action=file&userName=&td=1544605318654 (Caused by SSLError(SSLCertVerificationError("hostname 'i.shufang.cnki.net' doesn't match either of '.cnki.net', 'www.cnki.net', '.global.cnki.net', '*.oversea.cnki.net', 'big5.book.oversea.cnki.net', 'caj.d.cnki.net', 'caj.oversea.d.cnki.net', 'en.cend.cnki.net', 'eng.tcm.cnki.net', 'gb.book.oversea.cnki.net', 'gb.cend.cnki.net', 'gb.cnbar.cnki.net', 'gb.obaor.cnki.net', 'gb.sczlmz.cnki.net', 'gb.sczlzj.cnki.net', 'gb.tcm.cnki.net', 'kb.tcm.cnki.net', 'oversea.d.cnki.net', 'pdf.d.cnki.net', 'pdf.oversea.d.cnki.net', 'tra.tcm.cnki.net', 'cnki.net'")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 259, in
main()
File "main.py", line 253, in main
search.search_reference(get_uesr_inpt())
File "main.py", line 99, in search_reference
self.pre_parse_page(second_get_res.text), second_get_res.text)
File "main.py", line 188, in parse_page
self.download_url)
File "D:\chromedownloads\CNKI-download-master\CNKI-download-master\GetPageDetail.py", line 73, in get_detail_page
params=params)
File "D:\Users\18301\anaconda3\lib\site-packages\requests\sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "D:\Users\18301\anaconda3\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "D:\Users\18301\anaconda3\lib\site-packages\requests\sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "D:\Users\18301\anaconda3\lib\site-packages\requests\adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='i.shufang.cnki.net', port=443): Max retries exceeded with url: /KRS/KRSWriteHandler.ashx?curUrl=detail.aspx%3FdbCode%3DCJFQ%26fileName%3DJJDK202009024&referUrl=https%3A%2F%2Fkns.cnki.net%2Fkns%2Fbrief%2Fbrief.aspx%3Fpagename%3DASP.brief_default_result_aspx%26isinEn%3D1%26dbPrefix%3DSCDB%26dbCatalog%3D%25e4%25b8%25ad%25e5%259b%25bd%25e5%25ad%25a6%25e6%259c%25af%25e6%259c%259f%25e5%2588%258a%25e7%25bd%2591%25e7%25bb%259c%25e5%2587%25ba%25e7%2589%2588%25e6%2580%25bb%25e5%25ba%2593%26ConfigFile%3DCJFQ.xml%26research%3Doff%26t%3D1544249384932%26keyValue%3D%25E6%259B%25BE%25E6%2599%25A8%26S%3D1%26sorttype%3D%23J_ORDER%26&cnkiUserKey=199bceef-d913-a550-9ff0-b5614a82b64&action=file&userName=&td=1544605318654 (Caused by SSLError(SSLCertVerificationError("hostname 'i.shufang.cnki.net' doesn't match either of '.cnki.net', 'www.cnki.net', '.global.cnki.net', '*.oversea.cnki.net', 'big5.book.oversea.cnki.net', 'caj.d.cnki.net', 'caj.oversea.d.cnki.net', 'en.cend.cnki.net', 'eng.tcm.cnki.net', 'gb.book.oversea.cnki.net', 'gb.cend.cnki.net', 'gb.cnbar.cnki.net', 'gb.obaor.cnki.net', 'gb.sczlmz.cnki.net', 'gb.sczlzj.cnki.net', 'gb.tcm.cnki.net', 'kb.tcm.cnki.net', 'oversea.d.cnki.net', 'pdf.d.cnki.net', 'pdf.oversea.d.cnki.net', 'tra.tcm.cnki.net', 'cnki.net'")))

D:\chromedownloads\CNKI-download-master\CNKI-download-master>

@Maer321
Copy link

Maer321 commented Nov 20, 2021

您好 这个问题现在解决了嘛

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

2 participants