diff options
-rw-r--r-- | main.py | 12 |
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()) |