Subtle bugs now resolved. - zs - Zeitungsschau rss to email converter
Log
Files
Refs
LICENSE
---
commit 96b774b6b2233be6b3959e9ceceacdcc91463105
parent da06d30ff47031e7ddf40b37d841586ac9bd9c48
Author: Christoph Lohmann <20h@r-36.net>
Date:   Tue, 23 May 2017 21:02:14 +0200

Subtle bugs now resolved.

Diffstat:
  zeitungsschau/feed.py               |       8 ++++----

1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/zeitungsschau/feed.py b/zeitungsschau/feed.py
@@ -40,7 +40,7 @@ def parsexml(astr):
         # Throw XML parsing errors so we can blame the feed authors.
         return xml
 
-def parsejson(astr):
+def parsejsonfeed(astr):
         js = json.loads(astr)
 
         feed = {}
@@ -119,7 +119,7 @@ def parsejson(astr):
 
         return feed
 
-def parseatom(astr):
+def parseatomfeed(astr):
         xml = parsexml(astr)
         if xml == None:
                 return None
@@ -372,7 +372,7 @@ def fetch(uri):
                                 ftype = "json"
 
         if ftype == "xml":
-                return (rcode, parsexml(fval))
+                return (rcode, parseatomfeed(fval))
         else:
-                return (rcode, parsejson(fval.decode("utf-8")))
+                return (rcode, parsejsonfeed(fval.decode("utf-8")))