https://github.com/mindpatch/startpage-parser
parsing search results from startpage search engine (based on google.com results)
https://github.com/mindpatch/startpage-parser
bs4 google-parser googlesearch parsing python startpage
Last synced: 4 months ago
JSON representation
parsing search results from startpage search engine (based on google.com results)
- Host: GitHub
- URL: https://github.com/mindpatch/startpage-parser
- Owner: MindPatch
- License: gpl-3.0
- Created: 2021-06-01T14:34:14.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-07T05:11:39.000Z (almost 4 years ago)
- Last Synced: 2025-02-19T09:23:16.474Z (4 months ago)
- Topics: bs4, google-parser, googlesearch, parsing, python, startpage
- Language: Python
- Homepage: https://pypi.org/project/startpage-parser/1.0.0/
- Size: 39.1 KB
- Stars: 14
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# startpage-parser
parsing search results from startpage search engine (based on google.com results)
you can use it if you need get some 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 .
```***
```python
>>> 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': Hello World}, {'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': Hello}, {'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': Hello World}, {'title': 'Hello World - Go by Example', 'link': 'https://gobyexample.com/hello-world', 'description': 'To run the program, put the code in '}]}```
### examples
```python
from startpage import StartPagetask = 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: Hello World
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: Hello
Link: https://www.learnpython.org/en/Hello,_World!
======
"""
```
![]()
![]()