Fix urlmatch test

This commit is contained in:
Tobias Gruetzmacher 2019-12-05 00:58:31 +01:00
parent 1501055513
commit ad8a46f67a

View file

@ -101,7 +101,7 @@ def _check_stripurl(strip, scraperobj):
return return
# test that the stripUrl regex matches the retrieved strip URL # test that the stripUrl regex matches the retrieved strip URL
urlmatch = re.escape(scraperobj.stripUrl) urlmatch = re.escape(scraperobj.stripUrl)
urlmatch = urlmatch.replace(r"\%s", r".+") urlmatch = urlmatch.replace(r"%s", r".+")
urlmatch = "^%s$" % urlmatch urlmatch = "^%s$" % urlmatch
ro = re.compile(urlmatch) ro = re.compile(urlmatch)
mo = ro.search(strip.strip_url) mo = ro.search(strip.strip_url)