mirror of
https://github.com/rembo10/headphones.git
synced 2026-04-11 23:49:27 +01:00
Better fix for #2183
This commit is contained in:
@@ -206,7 +206,7 @@ def server_message(response):
|
||||
message = None
|
||||
|
||||
# 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:
|
||||
soup = BeautifulSoup(response.content, "html5lib")
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user