From c4d85c371226380ae82f722938ca12eb5a528512 Mon Sep 17 00:00:00 2001 From: Andronaco Marco Date: Wed, 12 Jul 2023 16:01:59 +0200 Subject: better print --- main.py | 12 +++++++----- 1 file 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()) -- cgit 1.4.1-2-gfad0