Build an Application to extract news from Google News Feed Using Python
Prerequisite– Python tkinter
In this article, we are going to write a python script to extract news articles from Google News Feed by using gnewsclient module and bind it with a GUI application. gnewsclient is a python client for Google News Feed. This API has to installed explicitly first in order to be used.
The following terminal command installs gnewsclient package along with all its required libraries. So, one just simply has to run this command in their terminal.
pip install gnewsclient
Using the module
- Import the gnewsclient module
- Create a NewsClient object and set current parameter settings
- Get news feed
Following code depicts how other factors like location, language and topic can be printed from information collected by this module:
Program 2: This code implements the methodology of program 1 in GUI.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course