From 9ca1c967872655fe8c87fb3aa65da68791b7d521 Mon Sep 17 00:00:00 2001 From: Castro0o Date: Thu, 16 Nov 2017 16:39:59 +0100 Subject: [PATCH] adding print statements --- wiki-download.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wiki-download.py b/wiki-download.py index 230025d..1f45c29 100755 --- a/wiki-download.py +++ b/wiki-download.py @@ -43,6 +43,7 @@ site = mwsite(args.host, args.path) query= ('[[File:+]]'+ args.ask) +print 'Query:', query # examples: # [[File:+]][[Year::+]][[Document_Type::Poster]] @@ -57,6 +58,7 @@ for answer in site.ask(query): img_page_url = answer[img_key]['fullurl'] img = image.Image(site, answer) img_info = img.imageinfo # dict includes url and extensive metadata + print img_name # FILE DOWNLOAD if 'url' in img_info.keys() and len(args.download) > 0: img_url = (img_info['url']).replace('https','http') @@ -75,7 +77,6 @@ for answer in site.ask(query): download_path = args.download print u'Saved to {}'.format(download_path + img_name) if args.verbose: - print 'File text:',img_text pprint.pprint( img_info ) print