Created
June 16, 2020 00:22
-
-
Save TheNorthEestern/7b33c4391edcde4d2e9cb6e954052474 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 requests | |
from pprint import pprint | |
import xml.etree.ElementTree as ET | |
session = requests.Session() | |
session.headers.update({'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0'}) | |
r = session.get("https://www.reddit.com/r/NHKEasyNews/.rss") | |
root = ET.fromstring(r.text) | |
print(root.tag) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment