How to Google Search using python
how to install Google package
step 1 :- google package को install करने से पहले हमे beautifulsoup4 को install करने की जरूरत पड़ती है।
pip install beautifulsoup4
step 2 :- अब google package को इनस्टॉल करेंगे
pip install google
Required Function and its parameters
search(query, tld='com', lang='en', num=10, start=0, stop=None, pause=2)
- query :- वह string जो हम search करना चाहते है।
- tld (top level domain) :- tld का अर्थ है वह domain जिसमे हम अपना result खोजना चाहते है जैसे com , in आदि।
- lang :- lang का अर्थ है वह language जिसमे हमे result चाहिए।
- num :- जितने हम रिजल्ट चाहते है।
Python codes on how to do google search
from googlesearch import search query = "google" for i in search (query, tld="com",num=10, stop=10, pause=2): print(i)
# OUTPUT https: // techcrunch.com / 2020 / 07 / 29 / googles - sundar - pichai - grilled - over - destroying - anonymity - on - the - internet / https://www.ndtv.com/world-news/why-does-google-steal-content-from-honest-businesses-us-congressman-2271102 https://twitter.com/Google?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5EauthorOur open source #MachineLearning platform, @TensorFlow, is used across the globe for social good. See how @TambuaHealth is using TensorFlow to help doctors determine the likelihood of respiratory diseases. #PoweredByTensorFlow pic.twitter.com/nPiidHdKdn
— Google (@Google) July 29, 2020So many great new games, how do you decide what to play first? Whether you go for the food-themed puzzle or the Mars Survival Project, join us in congratulating the winners of the #PlayIndie Games Festival. Give the winning titles a try → https://t.co/aQQHKRX4aB
— Google (@Google) July 27, 2020https://en.wikipedia.org/wiki/Google https://www.instagram.com/google/?hl=en https://twitter.com/google?lang=en https://www.youtube.com/user/GoogleThe Google IT Certificate program has become the single most popular certificate on @Coursera. Why? It helps learners land jobs in the high-paying field of IT support—no college degree required. New opportunities coming soon → https://t.co/FUC7aHnITM #GrowWithGoogle
— Google (@Google) July 27, 2020