tasos-py/Search-Engines-Scraper

Unsupported or invalid CSS selector

Closed this issue · 2 comments

When searching with google I get this error.
`
Searching Google

page: 1 links: 9Traceback (most recent call last):
File "C:/Users/pegag/AppData/Local/Programs/Python/Python38/scrapesearch.py", line 4, in
results = engine.search("my query")
File "C:/Users/pegag/AppData/Local/Programs/Python/Python38\search_engines\engine.py", line 171, in search
request = self._next_page(tags)
File "C:/Users/pegag/AppData/Local/Programs/Python/Python38\search_engines\engines\google.py", line 36, in _next_page
next_page = self._get_tag_item(tags.select_one(selector), 'href')
File "C:\Users\pegag\AppData\Local\Programs\Python\Python38\lib\site-packages\bs4\element.py", line 1340, in select_one
value = self.select(selector, limit=1)
File "C:\Users\pegag\AppData\Local\Programs\Python\Python38\lib\site-packages\bs4\element.py", line 1476, in select
raise ValueError(
ValueError: Unsupported or invalid CSS selector: "a[href][aria-label=Page 2]"
`

This is probably because of your bs4 version, I don't get this error on my pc. I updated /requirements.txt with my bs4 version, could you give it try?

That worked! thank you so much. <3