浏览代码

Update pre-toolbar regex, closes #22

RichardG867 2 年之前
父节点
当前提交
44ed1a6f1a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      waybackproxy.py

+ 1 - 1
waybackproxy.py

@@ -337,7 +337,7 @@ class Handler(socketserver.BaseRequestHandler):
 						return self.send_redirect_page(http_version, archived_url, redirect_code)
 
 				# Remove pre-toolbar scripts and CSS.
-				data = re.sub(b'''<script (?:src="//archive\\.org/|type="text/javascript" src="/_static/js/).*<!-- End Wayback Rewrite JS Include -->\\r?\\n''', b'', data, count=1, flags=re.S)
+				data = re.sub(b'''<script (?:src="//archive\\.org/|type="text/javascript" src="(?://web-static\\.archive\\.org)?/_static/js/).*<!-- End Wayback Rewrite JS Include -->\\r?\\n''', b'', data, count=1, flags=re.S)
 				# Remove toolbar. The if_ asset tag serves no toolbar, but we remove it just in case.
 				data = re.sub(b'''<!-- BEGIN WAYBACK TOOLBAR INSERT -->.*<!-- END WAYBACK TOOLBAR INSERT -->''', b'', data, count=1, flags=re.S)
 				# Remove comments on footer.