Skip to content

Instantly share code, notes, and snippets.

@mouseos
Last active March 17, 2022 13:06
Show Gist options
  • Save mouseos/cd0c3fce576f4265434094cd5b4c10c7 to your computer and use it in GitHub Desktop.
Save mouseos/cd0c3fce576f4265434094cd5b4c10c7 to your computer and use it in GitHub Desktop.
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