startpage-parser
parsing search results from startpage search engine (based on google.com results) you can use it if you need gsome oogle results without get banned from google
INSTALL
- from pip
$ pip install startpage-parser
- from source
$ git clone https://github.com/knassar702/startpage-parser
$ cd startpage-parser
$ pip install -e .
CODE
>>> from startpage import StartPage
>>> task = StartPage()
>>> task.search("Hello World",page=1) # page = number of pages (page=10 > from page number one to page number ten)
>>> # All results stored in .results
>>> # print(task.results)
>>> # {'page number':"Results"}
>>> print(task.results)
{'1': [{'title': '"Hello, World!" program - Wikipedia', 'link': 'https://en.wikipedia.org/wiki/%22Hello,_World!%22_program', 'description': 'A "'}, {'title': 'Hello World (film) - Wikipedia', 'link': 'https://en.wikipedia.org/wiki/Hello_World_(film)', 'description': <b>Hello World</b>}, {'title': 'hello world - YouTube', 'link': 'https://www.youtube.com/watch?v=Yw6u6YkTgQ4', 'description': '30 Mar 2018 '}, {'title': 'Total immersion, Serious fun! with Hello-World!', 'link': 'https://www.hello-world.com/', 'description': 'Main index for '}, {'title': 'Hello, World! - Learn Python - Free Interactive Python Tutorial', 'link': 'https://www.learnpython.org/en/Hello,_World!', 'description': <b>Hello</b>}, {'title': 'C "Hello, World!" Program', 'link': 'https://www.programiz.com/c-programming/examples/print-sentence', 'description': 'In this example, you will learn to print "'}, {'title': 'C++ "Hello, World!" Program', 'link': 'https://www.programiz.com/cpp-programming/examples/print-sentence', 'description': 'In this example, we will learn to create a simple program named "'}, {'title': "The History of 'Hello, World' - HackerRank Blog", 'link': 'https://blog.hackerrank.com/the-history-of-hello-world/', 'description': '21 Apr 2015 '}, {'title': 'Hello World Studio', 'link': 'https://www.helloworldstudio.org/', 'description': <b>Hello World</b>}, {'title': 'Hello World - Go by Example', 'link': 'https://gobyexample.com/hello-world', 'description': 'To run the program, put the code in '}]}
examples
from startpage import StartPage
task = StartPage()
task.search("Hello World",page=1)
for page_num,results in task.results.items():
print(f'PAGE: {page_num}\n---------------')
for res in results:
print(f'Title: {res["title"]}\n Description: {res["description"]}\n Link: {res["link"]}\n======')
"""
PAGE: 1
---------------
Title: "Hello, World!" program - Wikipedia
Description: A "
Link: https://en.wikipedia.org/wiki/%22Hello,_World!%22_program
======
Title: Hello World (film) - Wikipedia
Description: <b>Hello World</b>
Link: https://en.wikipedia.org/wiki/Hello_World_(film)
======
Title: hello world - YouTube
Description: 30 Mar 2018
Link: https://www.youtube.com/watch?v=Yw6u6YkTgQ4
======
Title: Total immersion, Serious fun! with Hello-World!
Description: Main index for
Link: https://www.hello-world.com/
======
Title: Hello, World! - Learn Python - Free Interactive Python Tutorial
Description: <b>Hello</b>
Link: https://www.learnpython.org/en/Hello,_World!
======
"""
Metadata
Release files for startpage-parser 1.0.0
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 | Actions |
|---|---|---|---|---|
| startpage-parser-1.0.0.tar.gz | 3.2 kB | Without provenance | Details for startpage-parser-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| startpage_parser-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for startpage_parser-1.0.0-py3-none-any.whl |
Total release size: 18.8 kB
Release files / startpage-parser-1.0.0.tar.gz
| Download URL | startpage-parser-1.0.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f132b30e5e0cb4e3a1d01651339a367694611c3ee9e83ef5b034a7d5a75afc6
|
|
BLAKE2b-256 checksum How to use checksums |
156b0af4d900536d83cd67b4e52952a02a3b115979db151beb1f92846aad0da9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
|
Release files / startpage_parser-1.0.0-py3-none-any.whl
| Download URL | startpage_parser-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bac528f4425478bec1ee4ab88d5141d8054719d53a4fbb43236e0d1c46617902
|
|
BLAKE2b-256 checksum How to use checksums |
cbcb488248d6056aa9f2a38d43f63788bbd5d3da9f5e914799f9d913eb930ade
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
|
Security for startpage-parser 1.0.0
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.