Quantcast
Viewing all articles
Browse latest Browse all 106

Retrieving JSON Title, URL from Pygooglenews feedParser

I'm trying to retrieve values from pyGoogleNews (https://github.com/kotartemiy/pygooglenews)that is using feedParser to output the values.

Image may be NSFW.
Clik here to view.
Lib Info

Code Snippet as follows:

from pygooglenews import GoogleNewsgn = GoogleNews(lang = 'en', country = 'SG')cars = gn.topic_headlines('CAAqJAgKIh5DQkFTRUFvSEwyMHZNR3MwYWhJRlpXNHRSMElvQUFQAQ')print(cars)

which returns the following: (does not seem like a valid JSON file)

Image may be NSFW.
Clik here to view.
enter image description here

What I'm trying to achieve is to loop the "entries" list, to get the relevant title and link.

How do I go about doing this?


Viewing all articles
Browse latest Browse all 106

Trending Articles