浏览代码

Add url= to static URL detection

RichardG867 5 年之前
父节点
当前提交
36f31874ff
共有 1 个文件被更改,包括 1 次插入1 次删除
  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))