Simple Google parser
Project description
GOOgle spiDER
Google search engine parser on python3
Instruction
Requirement python 3.10+
pip install gooder
from gooder import Gooder
gooder = Gooder()
# Make request on google.com/search?q=Hello+World
parsed = gooder.parse(query="Hello World")
# Print only result links
print(gooder.get_links())
# Print only result titles
print(gooder.get_titles())
# Print all results list[tuple[link,title]]
print(gooder.raw_results)
# If TRUE = parsed, else = captcha/rate limit
if (parsed)
# Save urls to json file
gooder.save_to_file(only_urls=True, to_json=True, override=True, file="results.json")
Methods & Fields
Method/Field | Args | Example | Result |
---|---|---|---|
Gooder.parse | query: str, page: int=0, ignore_google: bool=True, clear_old: bool=True | gooder.parse("hello", clear_old=False) | True | False |
Gooder.raw_results | Field | Field | [[link, title], ...] |
Gooder.get_links | repeats: bool = False | gooder.get_links() | [unique_link, ...] |
Gooder.get_titles | None | gooder.get_titles() | [title, title, ...] |
Gooder.save_to_file | only_urls: bool = True override: bool = True to_json: bool = False file: str = "urls.txt" | gooder.save_to_file() | New file with urls |
Gooder.get_hostname | links: str | list | gooder.get_hostname(https://google.com/) | google.com |
Gooder.get_captcha_url | None | gooder.get_captcha_url() | None | google.com/sorry/... |
Gooder.get_headers | None | gooder.get_headers() | None | HTTPHeaderDict({...}) |
Todo:
- Add proxy manager
- Replace
raw_results: list(list())
todict()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gooder-0.3.1.tar.gz
(3.5 kB
view details)
Built Distribution
gooder-0.3.1-py3-none-any.whl
(18.3 kB
view details)
File details
Details for the file gooder-0.3.1.tar.gz
.
File metadata
- Download URL: gooder-0.3.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.3 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b1f5a166785aa751e1f5c59b9a9fe9570c4df1b550a0bed429566ddd9db444c8
|
|
MD5 |
e3b07077acc06c4330649dae4e9f6067
|
|
BLAKE2b-256 |
2ff49bbae94355a43ac5bab94d9a9e4d13bac0d8a605e2b247620b38a9fbeffe
|
File details
Details for the file gooder-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: gooder-0.3.1-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.3 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b7fe0bd497969a0dc1d0dce2dc3c89777b31b9c0ae3a3260bd551fd497e40db9
|
|
MD5 |
2f5997819c6f7aed9d2541211caf295d
|
|
BLAKE2b-256 |
5289fdf97d345a1108040b60c6a61b0e9b8d649e487d3b8318c95ee293b056c8
|