Explorar el Código

Log redirects involving HTML consumed through the QUICK_IMAGES interface

RichardG867 hace 5 años
padre
commit
df2766bef6
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      waybackproxy.py

+ 3 - 1
waybackproxy.py

@@ -166,7 +166,9 @@ class Handler(socketserver.BaseRequestHandler):
 			# through the QUICK_IMAGES interface.
 			if hostname == 'web.archive.org':
 				conn.close()
-				return self.redirect_page(http_version, '/'.join(request_url.split('/')[5:]), 301)
+				archived_url = '/'.join(request_url.split('/')[5:])
+				_print('[r] [QI]', archived_url)
+				return self.redirect_page(http_version, archived_url, 301)
 
 			# consume all data
 			data = conn.read()