Last active
March 17, 2022 13:06
-
-
Save mouseos/cd0c3fce576f4265434094cd5b4c10c7 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 xml.etree.ElementTree as ET | |
import requests | |
import xmltodict | |
rss = requests.get('http://example.com/xml/podcast.xml') | |
rss=(rss.content.decode()) | |
print(xmltodict.parse(rss)["rss"]["channel"]["item"][0]["enclosure"]["@url"])#最新のpodcastの音声ファイルを1件取得する。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment