Update app.py
Browse files
app.py
CHANGED
|
@@ -29,8 +29,9 @@ def proxy():
|
|
| 29 |
allow_redirects=False
|
| 30 |
)
|
| 31 |
content = response.content
|
|
|
|
| 32 |
if 'text/html' in response.headers.get('content-type', ''):
|
| 33 |
-
|
| 34 |
soup = BeautifulSoup(response.text, 'html.parser')
|
| 35 |
for tag in soup.find_all(href=True):
|
| 36 |
tag['href'] = '/proxy?url=' + tag['href']
|
|
|
|
| 29 |
allow_redirects=False
|
| 30 |
)
|
| 31 |
content = response.content
|
| 32 |
+
print(response.headers)
|
| 33 |
if 'text/html' in response.headers.get('content-type', ''):
|
| 34 |
+
|
| 35 |
soup = BeautifulSoup(response.text, 'html.parser')
|
| 36 |
for tag in soup.find_all(href=True):
|
| 37 |
tag['href'] = '/proxy?url=' + tag['href']
|