Просмотр исходного кода

Update pre-toolbar regex, closes #22

RichardG867 2 лет назад
Родитель
Сommit
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.