MeowalsoMeow

Error

Jun 23rd, 2021
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. Exception in test #3
  2.  
  3. Traceback (most recent call last):
  4. File "scraper.py", line 101, in <module>
  5. save_articles()
  6. File "scraper.py", line 97, in save_articles
  7. save_article(_type, cwd, url)
  8. File "scraper.py", line 73, in save_article
  9. text = soup2.find('div', class_='article-item__body').text.strip()
  10. AttributeError: 'NoneType' object has no attribute 'text'
  11.  
  12. Please find below the output of your program during this failed test.
  13. Note that the '>' character indicates the beginning of the input line.
  14.  
  15. ---
  16.  
  17. > 2
  18. > News Feature
  19. 0
  20. Page_1
  21. https://www.nature.com/nature/articles?searchType=journalSearch&sort=PubDate&page=1
  22. 1
  23. Page_2
  24. https://www.nature.com/nature/articles?searchType=journalSearch&sort=PubDate&page=2
  25. COVID_vaccines_and_breastfeeding_what_the_data_say.txt
  26. https://www.nature.com/articles/d41586-021-01680-x
Advertisement
Add Comment
Please, Sign In to add comment