Skip to content

Instantly share code, notes, and snippets.

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