From 16b9bdd7f92acadcf273a788ec09037161f2f91b Mon Sep 17 00:00:00 2001 From: Akash Mahanty Date: Tue, 18 Jan 2022 20:14:44 +0530 Subject: [PATCH] output the file name if known_url and file flag are passed. --- waybackpy/cli.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/waybackpy/cli.py b/waybackpy/cli.py index f0e2e25..3196cca 100644 --- a/waybackpy/cli.py +++ b/waybackpy/cli.py @@ -277,7 +277,16 @@ def main( with open(file_path, "a") as f: f.write("{url}\n".format(url=url)) - print(url) + click.echo(url) + + if url_count > 0: + click.echo( + "\n\n'{file_name}' saved in current working directory".format( + file_name=file_name + ) + ) + else: + click.echo("No known URLs found. Please try a diffrent input!") if known_urls: wayback = Url(url, user_agent)