Created
May 8, 2015 15:35
-
-
Save ianpreston/5c65bc9d03eacda516b3 to your computer and use it in GitHub Desktop.
lol lxml
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
In [1]: import lxml.html | |
In [2]: import requests | |
In [3]: x = """<?xml version="1.0" encoding="utf-8"?><sitemap><changefreq>Hello world</changefreq></sitemap>""" | |
In [4]: a = lxml.html.fromstring(x) | |
In [5]: a | |
Out[5]: <Element sitemap at 0x10517d050> | |
In [6]: b = lxml.html.fromstring('') | |
File "<string>", line unknown | |
XMLSyntaxError: line 1: Tag changefreq invalid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment