researches
Researches is a vanilla1 Google scraper. Minimal requirements.
search("Who invented papers?")
1 In context, this refers to raw/unformatted data and contents. researches does not clean them up for you, and it's not guranteed to be 100% human-readable. However, feeding to LLMs may help as most of them use word-level tokenizers.
Requirements
- A decent computer
- Python ≥ 3.9
httpx– HTTP connections.selectolax– The HTML parser.
Usage
Just start searching right away. Don't worry, Gemini won't hurt you (also gemini).
search(
"US to Japan", # query
hl="en", # language
ua=None, # custom user agent or ours
**kwargs # kwargs to pass to httpx (optional)
) -> Result
For people who love async, we've also got you covered:
await asearch(
"US to Japan" # query
hl="en", # language
ua=None, # custom user agent or ours
**kwargs # kwargs to pass to httpx (optional)
)
So, what does the Result class has to offer? At a glance:
result.snippet?
⤷ .text: str
⤷ .name: str?
result.aside?
⤷ .text: str
result.weather?
⤷ .c: str
⤷ .f: str
⤷ .precipitation: str
⤷ .humidty: str
⤷ .wind_metric: str
⤷ .wind_imperial: str
⤷ .description: str
⤷ .forecast: PartialWeatherForReport[]
⤷ .weekday: str
⤷ .high_c: str
⤷ .low_c: str
⤷ .high_f: str
⤷ .low_f: str
result.web: Web[]
⤷ .title: str
⤷ .url: str
⤷ .text: str
result.flights: Flight[]
⤷ .title: str
⤷ .description: str
⤷ .duration: str
⤷ .price: str
result.lyrics?
⤷ .text: str
⤷ .is_partial: bool
Background
Data comes in different shapes and sizes, and Google played it extremely well. That also includes randomizing CSS class names making it almost impossible to scrape data.
Google sucks, but it's actually the knowledge base we all need. Say, there are these types of result pages:
- Links – What made Google, "Google." Or,
&udm=14. - Rich blocks – Rich blocks that introduce persons, places and more.
- Weather – Weather forecast.
- Wikipedia (aside) – Wikipedia text.
- Flights – Flights.
...and many more. (Contribute!)
Scraper APIs out there are hella expensive, and ain't no way I'm paying or entering their free tier. So, I made my own that's perfect for extracting data with LLMs.
Metadata
Release files for researches 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| researches-0.3.tar.gz | 8.5 kB | Without provenance | Details |
Release files / researches-0.3.tar.gz
| Download URL | researches-0.3.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69b177d6d604f18cd112ad727219abbed886abeea625d2a12aa1c5a2ee9dbf88
|
|
BLAKE2b-256 checksum How to use checksums |
4d3087ac96745bf387b55926601d11a29f184257ffbad3979a38d63cb30deab9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for researches 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.