Ⅱ. やり方
1. 必要なモジュールをインストールする
pip install feedparser
2. サンプルプログラムを書く
main.py
import feedparser
import json
feed = feedparser.parse('https://gigazine.net/news/rss_2.0/', response_headers={"content-type": "text/xml; charset=utf-8"})
for x in feed.entries:
print(x.title)
print(x.links[0].href)
実行結果
月に270万円以上の収益を上げる開発スタートアップはどのような成長を遂げてきたのか?
https://gigazine.net/news/20180624-slack-bot-standuply-mmr/
過去の歴史からわかる「技術者の仕事がAIに奪われることがない」理由とは?
https://gigazine.net/news/20180624-history-of-math-teach-future-ai/
GoogleやAppleがあなたのスマホ使用時間を減らそうとしている理由とは?
https://gigazine.net/news/20180624-why-google-apple-want-your-phone-less/
(以下略)