From 52dd2f380cbf0426438373f96ece4bf8f9717b42 Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Tue, 14 Apr 2020 12:40:01 +0200 Subject: [PATCH] example of reading text from a pad --- readfrompad.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 readfrompad.py diff --git a/readfrompad.py b/readfrompad.py new file mode 100644 index 0000000..8158413 --- /dev/null +++ b/readfrompad.py @@ -0,0 +1,11 @@ +from urllib.request import urlopen + + +pad_url = "https://pad.xpub.nl/p/boring_old_tomato_sandwiches" +pad_text_url = pad_url + "/export/txt" + +f = urlopen(pad_text_url) +pad_text = f.read().decode('utf-8') + +print (pad_text) +