Explorar o código

Log redirects involving HTML consumed through the QUICK_IMAGES interface

RichardG867 %!s(int64=5) %!d(string=hai) anos
pai
achega
df2766bef6
Modificáronse 1 ficheiros con 3 adicións e 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()