Comments (11)
just use 'googlesearch' liberary by
author = 'Anime no Sekai'
copyright = 'Copyright 2021, googlesearch'
credits = ['animenosekai']
license = 'MIT License'
version = 'googlesearch v1.1.1'
maintainer = 'Anime no Sekai'
email = '[email protected]'
status = 'Stable'
it works fine for me
from googlesearch.
I get the same problem
from googlesearch.
Same here. Can anyone help me?
from googlesearch.
I think it's because the selector is not working
So we can just wait until it gets fixed
from googlesearch.
Same here
from googlesearch.
I fixed the problem, by change RESULT_SELECTOR = "div.g"
to RESULT_SELECTOR = "div.g>div>div"
(Update!) NEW SOLUTION HERE: #75 (comment)
googlesearch/googlesearch/googlesearch.py
Line 24 in e2d3e74
and then, replace code line 70 with selector = GoogleSearch.RESULT_SELECTOR
or just delete it and change soup.select()
argument (line 71) with self.RESULT_SELECTOR
googlesearch/googlesearch/googlesearch.py
Lines 70 to 71 in e2d3e74
from googlesearch.
self.RESULT_SELECTOR
KeyError: 'href' when trying your fix
from googlesearch.
@BisratGetnet I have new solution here
Change RESULT_SELECTOR
to:
RESULT_SELECTOR = "div.g>div>div.tF2Cxc"
Here my output, for my new solution
it's remove duplicate result (you can compare with my previous screenshot)
from googlesearch.
@BisratGetnet I have new solution here
Change
RESULT_SELECTOR
to:RESULT_SELECTOR = "div.g>div>div.tF2Cxc"Here my output, for my new solution
it's remove duplicate result (you can compare with my previous screenshot)
Thanks for replaying but still same error i think it's because google user different selector in different countries can you show me how to take a selector based on google search results.
from googlesearch.
Thanks for replaying but still same error i think it's because google user different selector in different countries can you show me how to take a selector based on google search results.
Ah... okay.
You need to open Inspect on your browser, and then select element that you want to scrape, after that right click element and then copy Selector/CSS Selector. Alternatively you can find element manually.
To test whether the element being searched for is correct, you can test using method querySelectorAll or querySelector on your Console.
for example:
document.querySelectorAll('div.g>div>div.tF2Cxc');
Here's reference for CSS Selector:
https://www.w3schools.com/cssref/css_selectors.asp
Sorry if my explanation is not detailed enough or makes you confused because of my English 🙈, hope it helps you.
from googlesearch.
I only got "HTTPError: Too Many Requests", anyone can help?
from googlesearch.
Related Issues (20)
- input conversion failed due to input error HOT 1
- HTTPError: HTTP Error 500: Internal Server Error HOT 1
- prefetch_pages vs prefetch_results
- HTTPError: Service Unavailable
- Too many requests
- How to access to the desired link number ? HOT 1
- ModuleNotFoundError: No module named 'urllib2' HOT 4
- ERROR
- Handling "HTTP Error 429" error.
- Urllib2 causing troubles HOT 4
- browser_agents.txt not found HOT 2
- too many arguments
- Selector not working anymore HOT 1
- IndexError: list index out of range HOT 1
- HttpError
- Default prefetch_pages argument make program feels like running forever!
- Search fails when results page shows no total HOT 2
- New Document Please HOT 1
- hi.googlesearch by default returned section all of google engine. yes? how I get results of googlenews section??thanks HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from googlesearch.