commit 62b25f1cba4a7af931ccd8f4420d0669812db09c Author: hiro hiro@torproject.org Date: Wed Sep 4 14:45:18 2019 +0200
Clean up and update xml stream plugin --- packages/xml-to-html/lektor_xml_to_html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/xml-to-html/lektor_xml_to_html.py b/packages/xml-to-html/lektor_xml_to_html.py index a98541d..dbffae5 100644 --- a/packages/xml-to-html/lektor_xml_to_html.py +++ b/packages/xml-to-html/lektor_xml_to_html.py @@ -17,8 +17,8 @@ class XmlToHtmlPlugin(Plugin):
def on_setup_env(self, **extra):
- def stream(identifier=None, url=None): - webFile = request.urlopen("https://blog.torproject.org/events.xml") + def stream(url=None): + webFile = request.urlopen(url) content = webFile.read() root = etree.fromstring(content) items = root.findall('channel/item')