summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndronaco Marco <marco.andronaco@olivetti.com>2023-07-12 16:01:59 +0200
committerAndronaco Marco <marco.andronaco@olivetti.com>2023-07-12 16:01:59 +0200
commitc4d85c371226380ae82f722938ca12eb5a528512 (patch)
tree75d945e9ef03929be0f0d2e5bd03e00a9b97faae
parenteceadcf2f0e4150b131b14e7c3c9553f1169b87e (diff)
downloadsunstroke-c4d85c371226380ae82f722938ca12eb5a528512.tar.gz
better print
-rw-r--r--main.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/main.py b/main.py
index c77f965..29c70e1 100644
--- a/main.py
+++ b/main.py
@@ -36,19 +36,21 @@ def handle_links(name, links):
         con = Pyload()
         return [ download_link(con, name, link) for link in links ]
     except URLError:
-        print("Connessione a Pyload rifiutata.")
+        print("\nConnessione a Pyload rifiutata.")
 
     print("Link da aggiungere manualmente:\n")
-    for x in links:
-        print(x)
-    print()
+    print("\n".join(links))
+    print("")
     return []
 
 def main():
     newspapers = get_newspaper(NEWSPAPER_PREFIX, 0) # 0 -> today
-    name = NEWSPAPER_PREFIX + datetime.today().strftime("%Y-%m-%d")
+    name = f"{NEWSPAPER_PREFIX} - {datetime.today().strftime('%Y-%m-%d')}"
     links = get_sorted_links(newspapers)
     pids = handle_links(name, links)
+    print(len(pids), "link aggiunti a Pyload.")
+    print("Premi INVIO per uscire.")
+    input()
 
 if __name__ == "__main__":
     exit(main())