How to get Google News using Python program?

  • Install Google News Package using PIP Package Installer using followning command
  • pip3 install GoogleNews –user
  • Then Create a object for GoogleNews
  • Call the search method of GoogleNews Object
  • Get the search results using result method
  • Result Array contains title,date, desc(Description) and links of the News
  • Code Snippet

         from GoogleNews import GoogleNews
         googlenews = GoogleNews()
         googlenews =GoogleNews(period='7d')
         googlenews.search("IN")
         result=googlenews.result();
         for x in result:
              print("-"*75);
              print("Title--",x['title'])
              print("Date/ Time--", x['date'])
              print("Description--", x['desc'])
              print("Link--", x['link'])