summary refs log tree commit diff stats
path: root/Overpost.py
diff options
context:
space:
mode:
authorAndronaco Marco <marco.andronaco@olivetti.com>2023-07-12 15:47:56 +0200
committerAndronaco Marco <marco.andronaco@olivetti.com>2023-07-12 15:47:56 +0200
commiteceadcf2f0e4150b131b14e7c3c9553f1169b87e (patch)
tree8b4f20909640d91c0727226422065861d0f80d52 /Overpost.py
parentdbe85ea6d39ca7b2037ecf8c439b7d5d8f97e939 (diff)
downloadsunstroke-eceadcf2f0e4150b131b14e7c3c9553f1169b87e.tar.gz
sort based on host preference, add startup script
Diffstat (limited to 'Overpost.py')
-rw-r--r--Overpost.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Overpost.py b/Overpost.py
index 6404b37..cbea1ea 100644
--- a/Overpost.py
+++ b/Overpost.py
@@ -69,10 +69,11 @@ def get_links(rss_url):
     return [ parse_entry(entry) for entry in feed.entries ]
 
 def get_newspaper(prefix="", index=0):
-    links = get_links(RSS_URL)
+    all_links = get_links(RSS_URL)
     try:
-        daily = links[index][1]
+        daily = all_links[index][1]
     except IndexError:
+        print("Empty feed.")
         return {}
     return { k: v for k, v in daily.items() if k.startswith(prefix)}