Skip to content

Commit daae7ad

Browse files
thequantumquirktechyminati
authored andcommitted
python_codes: reddit.py: Add Module to fetch posts from GNews
Install gnewsclient module to use this. This Module will return a dictionary with Title, Description and Image of the post
1 parent 604a2ea commit daae7ad

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎GNews.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import gnewsclient
2+
from gnewsclient import gnewsclient
3+
def getNews():
4+
client = gnewsclient.NewsClient(language='tamil',
5+
location='india',
6+
topic='Business',
7+
use_opengraph = True,
8+
max_results=10)
9+
10+
return (client.get_news())

0 commit comments

Comments
 (0)