Skip to content

Instantly share code, notes, and snippets.

@shmidtelson
Created September 2, 2019 07:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shmidtelson/db071a1be582c885b03d26633d28c84a to your computer and use it in GitHub Desktop.
Save shmidtelson/db071a1be582c885b03d26633d28c84a to your computer and use it in GitHub Desktop.
Parse
import requests
from bs4 import BeautifulSoup
resp = requests.get("http://static.feed.rbc.ru/rbc/logical/footer/news.rss")
soup = BeautifulSoup(resp.content)
items = soup.findAll('item')
for item in items:
print(item.title.text.replace("<![CDATA[", "").replace("]]>", ""))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment