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

AttributeError: 'NoneType' object has no attribute 'find_all'这个怎么解决呀 #40

Open
piao0623 opened this issue Jan 4, 2022 · 3 comments

Comments

@piao0623
Copy link

piao0623 commented Jan 4, 2022

Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\CNKI-download\main.py", line 259, in
main()
File "C:\Users\Administrator\Desktop\CNKI-download\main.py", line 253, in main
search.search_reference(get_uesr_inpt())
File "C:\Users\Administrator\Desktop\CNKI-download\main.py", line 98, in search_reference
self.parse_page(
File "C:\Users\Administrator\Desktop\CNKI-download\main.py", line 186, in parse_page
page_detail.get_detail_page(self.session, self.get_result_url,
File "C:\Users\Administrator\Desktop\CNKI-download\GetPageDetail.py", line 80, in get_detail_page
self.pars_page(get_res.text)
File "C:\Users\Administrator\Desktop\CNKI-download\GetPageDetail.py", line 89, in pars_page
orgn_list = soup.find(name='div', class_='orgn').find_all('a')
AttributeError: 'NoneType' object has no attribute 'find_all'

@barnett2010
Copy link

是否需要规定文献来源(y/n)?n
正在检索中.....
--------------------------
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 107, in pre_parse_page
page_source).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

@PPF12138
Copy link

PPF12138 commented Apr 4, 2022

是否需要规定文献来源(y/n)?n 正在检索中..... -------------------------- 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 107, in pre_parse_page page_source).group(1) AttributeError: 'NoneType' object has no attribute 'group'

试试将所有文件中的"http"都替换成"https"

@DavidLeexxxx
Copy link

Traceback (most recent call last): File "C:\Users\Administrator\Desktop\CNKI-download\main.py", line 259, in main() File "C:\Users\Administrator\Desktop\CNKI-download\main.py", line 253, in main search.search_reference(get_uesr_inpt()) File "C:\Users\Administrator\Desktop\CNKI-download\main.py", line 98, in search_reference self.parse_page( File "C:\Users\Administrator\Desktop\CNKI-download\main.py", line 186, in parse_page page_detail.get_detail_page(self.session, self.get_result_url, File "C:\Users\Administrator\Desktop\CNKI-download\GetPageDetail.py", line 80, in get_detail_page self.pars_page(get_res.text) File "C:\Users\Administrator\Desktop\CNKI-download\GetPageDetail.py", line 89, in pars_page orgn_list = soup.find(name='div', class_='orgn').find_all('a') AttributeError: 'NoneType' object has no attribute 'find_all'

请问这个问题您后面解决了么

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

4 participants