From 669ae477c7a663e9824a2306d37002c1d7b8facd Mon Sep 17 00:00:00 2001 From: daniel-Jones Date: Fri, 2 Feb 2018 22:45:08 +1030 Subject: now case insensitive --- urlopen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'urlopen.py') diff --git a/urlopen.py b/urlopen.py index 5c224d1..760f961 100755 --- a/urlopen.py +++ b/urlopen.py @@ -22,13 +22,13 @@ def main(args): if (any (s in domain for s in defaultforcedurls)): print("running with forced default application {}".format(each)); run(defaultapp, each); - elif (each.endswith(tuple(images))): + elif (each.lower().endswith(tuple(images))): print("image {}".format(each)); run(imageapp, each); - elif (each.endswith(tuple(videos))): + elif (each.lower().endswith(tuple(videos))): print("video {}".format(each)); run(videoapp, each); - elif (each.endswith(tuple(pdf))): + elif (each.lower().endswith(tuple(pdf))): print("pdf {}".format(each)); run(pdfapp, each); elif (any(s in domain for s in videourls)): -- cgit v1.2.3