Describe the bug
When I do the search site:xkcd.com exploit using DDG, a single page of results is returned. When the duckduckgo.pyparse_single_result() method is called, it tries to parse links when it gets a block indicating its the end of the search results. This causes an error with link_tag.get('href') and rdict["descriptions"] = desc.text as they are None.
To Reproduce
Steps to reproduce the behavior:
Open python console to
Import search_engine_parser
Search using Duck Duck Go Engine
Use query site:xkcd.com exploit
See NoResultsOrTrafficError (when trying to parse the last result with parse single result)
Expected behavior
This should return the list of search_results
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Arch
Python Version 3.9.9 & 3.10.2
Search-engine-parser version git master
Additional context
Working on a PR. I have it fixed but making sure the tests are passing.
Describe the bug When I do the search
site:xkcd.com exploit
using DDG, a single page of results is returned. When theduckduckgo.py
parse_single_result()
method is called, it tries to parse links when it gets a block indicating its the end of the search results. This causes an error withlink_tag.get('href')
andrdict["descriptions"] = desc.text
as they areNone
.To Reproduce Steps to reproduce the behavior:
site:xkcd.com exploit
Expected behavior This should return the list of search_results
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
git master
Additional context Working on a PR. I have it fixed but making sure the tests are passing.