-
-
Save anonymous/7059517d40d3801be940 to your computer and use it in GitHub Desktop.
How would I request the XML URL and parse it for the <loc> nodes?
This file contains 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
from xml.etree import ElementTree | |
import requests | |
response = requests.get("http://www.monkeysee.com/sitemap/0/5000/video_clip.xml") | |
tree = ElementTree.fromstring(response.content) | |
root = tree.getroot() | |
#> AttributeError: 'Element' object has no attribute 'getroot' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment