Skip to content

Instantly share code, notes, and snippets.

@aytvill
Forked from edemnati/RSS_Feed_data.py
Created August 19, 2023 18:35
Show Gist options
  • Save aytvill/f4ce9649505dc7cdeffa65529879d02f to your computer and use it in GitHub Desktop.
Save aytvill/f4ce9649505dc7cdeffa65529879d02f to your computer and use it in GitHub Desktop.
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