Pārlūkot izejas kodu

Add url= to static URL detection

RichardG867 5 gadi atpakaļ
vecāks
revīzija
36f31874ff
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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))