From 83b995b25f402119b86f8dc1d4635ea422ae72b1 Mon Sep 17 00:00:00 2001 From: nj1902 <1902ben10@gmail.com> Date: Fri, 2 Oct 2020 09:00:57 +0530 Subject: [PATCH 1/2] Requested Changes Applied --- README.md | 3 ++- .../Google Search Using Python/code.py | 8 -------- .../README.md | 2 +- .../Google_Search_Using_Python/code.py | 13 +++++++++++++ .../requirements.txt} | 0 5 files changed, 16 insertions(+), 10 deletions(-) delete mode 100644 Scripts/Web_Scrappers/Google Search Using Python/code.py rename Scripts/Web_Scrappers/{Google Search Using Python => Google_Search_Using_Python}/README.md (86%) create mode 100644 Scripts/Web_Scrappers/Google_Search_Using_Python/code.py rename Scripts/Web_Scrappers/{Google Search Using Python/requirements.txt.txt => Google_Search_Using_Python/requirements.txt} (100%) diff --git a/README.md b/README.md index 98e6b746f..fd2a82906 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ We now have a section for miscellaneous scripts as well.
Sahil Bairagi

💻
tauseefmohammed2

💻
Ameya Deshpande

💻 +
Naman Jain

💻 @@ -119,4 +120,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) +5 | [Google Search Using Python](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Web_Scrappers/Google_Search_Using_Python)| [Naman Jain](https://github.com/nj1902) diff --git a/Scripts/Web_Scrappers/Google Search Using Python/code.py b/Scripts/Web_Scrappers/Google Search Using Python/code.py deleted file mode 100644 index a7b8745e7..000000000 --- a/Scripts/Web_Scrappers/Google Search Using Python/code.py +++ /dev/null @@ -1,8 +0,0 @@ -# We will be using the search() function from the googlesearch module. -from googlesearch import search - -query = input("Enter your query : ") -# This is the text that you want to search for. - -for item in search(query, tld = "co.in", num=10, stop = 10, pause = 2): - print(item) \ No newline at end of file diff --git a/Scripts/Web_Scrappers/Google Search Using Python/README.md b/Scripts/Web_Scrappers/Google_Search_Using_Python/README.md similarity index 86% rename from Scripts/Web_Scrappers/Google Search Using Python/README.md rename to Scripts/Web_Scrappers/Google_Search_Using_Python/README.md index 556bef525..f7e8e1ad4 100644 --- a/Scripts/Web_Scrappers/Google Search Using Python/README.md +++ b/Scripts/Web_Scrappers/Google_Search_Using_Python/README.md @@ -23,7 +23,7 @@ search(query, tld='co.in', lang='en', num=10, start=0, stop=None, pause=2) - +
💻 Naman Jain 💻

💻 Naman Jain 💻

diff --git a/Scripts/Web_Scrappers/Google_Search_Using_Python/code.py b/Scripts/Web_Scrappers/Google_Search_Using_Python/code.py new file mode 100644 index 000000000..33a2e7d5d --- /dev/null +++ b/Scripts/Web_Scrappers/Google_Search_Using_Python/code.py @@ -0,0 +1,13 @@ +from googlesearch import search + +def gSearch(query : str) -> str: + + for item in search(query, tld = "co.in", num=10, stop = 10, pause = 2): + print(item) + + +# This is the text that you want to search for. +query = input("Enter your query : ") + +# Search Function called +gSearch(query) \ No newline at end of file diff --git a/Scripts/Web_Scrappers/Google Search Using Python/requirements.txt.txt b/Scripts/Web_Scrappers/Google_Search_Using_Python/requirements.txt similarity index 100% rename from Scripts/Web_Scrappers/Google Search Using Python/requirements.txt.txt rename to Scripts/Web_Scrappers/Google_Search_Using_Python/requirements.txt From 6022c394de397b92032a9a4f8f9a80e2330366f9 Mon Sep 17 00:00:00 2001 From: nj1902 <1902ben10@gmail.com> Date: Fri, 2 Oct 2020 09:03:41 +0530 Subject: [PATCH 2/2] Requested Changes Applied --- .../Web_Scrappers/Google_Search_Using_Python/code.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Scripts/Web_Scrappers/Google_Search_Using_Python/code.py b/Scripts/Web_Scrappers/Google_Search_Using_Python/code.py index 33a2e7d5d..86b72557f 100644 --- a/Scripts/Web_Scrappers/Google_Search_Using_Python/code.py +++ b/Scripts/Web_Scrappers/Google_Search_Using_Python/code.py @@ -5,9 +5,9 @@ def gSearch(query : str) -> str: for item in search(query, tld = "co.in", num=10, stop = 10, pause = 2): print(item) +if __name__ == "__main__": + # This is the text that you want to search for. + query = input("Enter your query : ") -# This is the text that you want to search for. -query = input("Enter your query : ") - -# Search Function called -gSearch(query) \ No newline at end of file + # Search Function called + gSearch(query) \ No newline at end of file