-
-
Save shmohawk/5ee3278246e3228a9a942bc5ebe1b4e0 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
diff --git a/alfix.py b/alfix.py | |
index eed2f61..b874148 100755 | |
--- a/alfix.py | |
+++ b/alfix.py | |
@@ -9,6 +9,7 @@ import gzip | |
from lxml import etree | |
from lxml import html | |
from lxml.html import builder as E | |
+from lxml.html import soupparser | |
from urllib.parse import urlparse, parse_qsl | |
from http import HTTPStatus | |
@@ -163,7 +164,7 @@ class myHandler(http.server.SimpleHTTPRequestHandler): | |
contents = self.page.get_element_by_id('contents') | |
for i in fetch(self.db, sql): | |
- doc = etree.fromstring(i['VALUE_XML']) | |
+ doc = soupparser.fromstring(i['VALUE_XML']) | |
res = transform(doc, codep='0', cdPath='"./"', linkUrl='""') | |
tbl = res.find('//table') | |
contents.append(tbl) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment