Last active
August 19, 2023 18:35
-
-
Save edemnati/934f074d1a2c1c6927b410fc7803f77c to your computer and use it in GitHub Desktop.
This file contains 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