mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-21 00:14:02 +01:00
Better fix for #2183
This commit is contained in:
@@ -206,7 +206,7 @@ def server_message(response):
|
|||||||
message = None
|
message = None
|
||||||
|
|
||||||
# First attempt is to 'read' the response as HTML
|
# First attempt is to 'read' the response as HTML
|
||||||
if response.headers and "text/html" in response.headers.get("content-type"):
|
if response.headers.get("content-type") == "text/html":
|
||||||
try:
|
try:
|
||||||
soup = BeautifulSoup(response.content, "html5lib")
|
soup = BeautifulSoup(response.content, "html5lib")
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user