-
-
Save aytvill/f4ce9649505dc7cdeffa65529879d02f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import feedparser | |
| from pandas.io.json import json_normalize | |
| import pandas as pd | |
| import requests | |
| rss_url='https://news.google.com/rss/search?q=apple' | |
| #Read feed xml data | |
| news_feed = feedparser.parse(rss_url) | |
| #Flatten data | |
| df_news_feed=json_normalize(news_feed.entries) | |
| #Read articles links | |
| df_news_feed.link.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment