【发布时间】:2021-03-25 21:45:08
【问题描述】:
我正在尝试从 pyGoogleNews (https://github.com/kotartemiy/pygooglenews) 中检索值 即使用 feedParser 输出值。
代码片段如下:
from pygooglenews import GoogleNews
gn = GoogleNews(lang = 'en', country = 'SG')
cars = gn.topic_headlines('CAAqJAgKIh5DQkFTRUFvSEwyMHZNR3MwYWhJRlpXNHRSMElvQUFQAQ')
print(cars)
返回以下内容:(似乎不是有效的 JSON 文件)
我想要实现的是循环“条目”列表,以获取相关标题和链接。
我该怎么做?
【问题讨论】:
标签: python feedparser google-news pygooglenews