Prechádzať zdrojové kódy

Add url= to static URL detection

RichardG867 5 rokov pred
rodič
commit
36f31874ff
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      waybackproxy.py

+ 1 - 1
waybackproxy.py

@@ -114,7 +114,7 @@ class Handler(socketserver.BaseRequestHandler):
 
 			# 403 or 404 => heuristically determine the static URL for some redirect scripts
 			if e.code in (403, 404):
-				match = re.search('''(?:\?|&)(?:target|trg|dest(?:ination)?|to)(?:url)?=(http[^&]+)''', request_url, re.IGNORECASE)
+				match = re.search('''(?:\?|&)(?:target|trg|dest(?:ination)?|to)?(?:url)?=(http[^&]+)''', request_url, re.IGNORECASE)
 				if match:
 					# we found it
 					new_url = urllib.parse.unquote_plus(match.group(1))