From 2b9cf12140e2f14b10989eddccb7094b6c4b2697 Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Tue, 14 Apr 2020 12:57:09 +0200 Subject: [PATCH] use markdown + html5lib to structure the text --- readfrompad.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readfrompad.py b/readfrompad.py index 3a61b66..9b23a85 100644 --- a/readfrompad.py +++ b/readfrompad.py @@ -13,11 +13,14 @@ f = urlopen(pad_text_url) pad_text = f.read().decode('utf-8') pad_text = sample_text +print (pad_text) +print () # print (pad_text) # Turn pad text into html text html = markdown.markdown(pad_text) print (html) +print () # Turn html text in an elementtree t = html5lib.parseFragment(html, namespaceHTMLElements=False)