-
Notifications
You must be signed in to change notification settings - Fork 7
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
lxml, google description, qwant and removing yandex. #7
base: master
Are you sure you want to change the base?
Conversation
Why did you remove Yandex? |
@@ -62,12 +63,29 @@ def _check_exceptions(self, res: ScrapeResponse) -> None: | |||
async def scrape(self, req: ScrapeRequest) -> List[SearchResult]: | |||
geo = req.geo if req.geo else "en_GB" | |||
urls = self._paginate(req.term, "", geo, req.count) | |||
headers = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't actually get applied to the request - as on line 83 - the headers are overriden by the call to self.user_agent() - which is probably what should be providing the headers.
@@ -14,6 +14,7 @@ | |||
install_requires = [ | |||
'aiohttp>=3.6.2', | |||
'beautifulsoup4>=4.8.2', | |||
'lxml' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an extra dependency which is probably not strictly required to use the package - also the version is not pinned. It would probably be better to allow the user to provide the html.parser implementation they want and default to 'html.parser' if an implementation is not provided.
Yandex does not work for me |
Hi,
Nice project, happy to contribute.
Best regards.