Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,4 @@ SR No | Project | Author
2 | [Pycon Proposals Scraper](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Web_Scrappers/Pycon_Proposals)| [Aditya Jetely](https://github.com/AdityaJ7)
3 | [Hacktoberfest Events Scraper](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Web_Scrappers/Hacktoberfest_Events)| [Aditya Jetely](https://github.com/AdityaJ7)
4 | [Wifi Speed Tester](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Miscellaneous/Wifi_Speed)| [AdeshChoudhar19](https://github.com/AdeshChoudhar19)
5 | [Google Search Using Python](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Miscellaneous/Wifi_Speed)| [Naman Jain](https://github.com/nj1902)
33 changes: 33 additions & 0 deletions Scripts/Web_Scrappers/Google Search Using Python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<h1 align = center> GOOGLE SEARCH </h1>

> To install the google module, we can use the pip package installer.

```
pip install -r requirements.txt
```

> We are using search() function from the googlesearch module.
```
search(query, tld='co.in', lang='en', num=10, start=0, stop=None, pause=2)
```
## Function Description
>> **query**: This is the text that you want to search for.<br/>
>> **tld**: This refers to the top level domain value like co.in or com which will specify which Google website we want to use.<br/>
>> **lang**: This parameter stands for language.<br/>
>> **num**: This is used to specify the number of results we want.<br/>
>> **start**: This is to specify from where to start the results. We should keep it 0 to begin from the very start.<br/>
>> **stop**: The last result to retrieve. Use None to keep searching forever.<br/>
>> **pause**: This parameter is used to specify the number of seconds to pause between consecutive HTTP requests because if we hit too many requests, Google can block our IP address.

## Contributor ✨

<table>
<tr>
<td align="center"><a href="https://github.com/nj1902"><img src="" width="200px;" alt=""/><sub><b>💻 Naman Jain 💻</b></sub></a><br /></td>


</table>

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
12 changes: 12 additions & 0 deletions Scripts/Web_Scrappers/Google Search Using Python/code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# We will be using the search() function from the googlesearch module.
from googlesearch import search

def query_finder(query):
for item in search(query, tld = "co.in", num=10, stop = 10, pause = 2):
print(item)

if __name__ == "__main__":
query = input("Enter your query : ") # This is the text that you want to search for.
query_finder(query)


Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google