zs

Zeitungsschau rss to email converter
git clone git://r-36.net/zs
Log | Files | Refs | LICENSE

commit 74bbbf2cf552994fee7bd10709f9b955d59ebe81
parent 95de7da12a3e61233385fdcf452827b91dd34e61
Author: Christoph Lohmann <20h@r-36.net>
Date:   Tue, 21 Mar 2017 19:50:29 +0100

Fix the initial gopher support.

Diffstat:
zeitungsschau/feed.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/zeitungsschau/feed.py b/zeitungsschau/feed.py @@ -258,7 +258,7 @@ def fetch(uri): else: host = urls.netloc port = 70 - if len(path) > 2: + if len(urls.path) > 2: if len(urls.query) > 0: selector = "%s?%s" % (urls.path[2:], urls.query) else: @@ -268,7 +268,7 @@ def fetch(uri): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, port)) - s.send("%s\r\n" % (selector)) + s.send(("%s\r\n" % (selector)).encode("utf-8")) s.shutdown(1) fd = s.makefile("r") fval = fd.read().encode("utf-8")