[b]"What's the best python library google search for scraping and automation?"[/b] or [b]"How to use a python libr

20 Replies, 1474 Views

If you’re okay with a bit of setup, `requests-html` is a cool python library google search alternative.

It renders JS, so you can scrape Google results more reliably than with `requests` alone.

Example:

```python
from requests_html import HTMLSession
session = HTMLSession()
r = session.get("https://www.google.com/search?q=python+library+google+search")
print(r.html.find("div.g"))
```

Not perfect, but it’s free and flexible.



Users browsing this thread: 1 Guest(s)