change encoding based on content
This helps users trying to read content with other encodings.
This commit is contained in:
@@ -93,6 +93,7 @@ def bypass_paywall(url):
|
|||||||
Bypass paywall for a given url
|
Bypass paywall for a given url
|
||||||
"""
|
"""
|
||||||
response = requests.get(url, headers=googlebot_headers)
|
response = requests.get(url, headers=googlebot_headers)
|
||||||
|
response.encoding = response.apparent_encoding
|
||||||
return response.text
|
return response.text
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user