diff options
Diffstat (limited to 'jfr_playoff')
-rw-r--r-- | jfr_playoff/remote.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jfr_playoff/remote.py b/jfr_playoff/remote.py index 74d75b5..b918ea1 100644 --- a/jfr_playoff/remote.py +++ b/jfr_playoff/remote.py @@ -16,8 +16,11 @@ class RemoteUrl: if url not in cls.url_cache: request = requests.get(url) encoding_match = re.search( - 'content=".*;( )?charset=(.*)"', + 'content=".*;( )?charset=(.*?)"', request.content, re.IGNORECASE) + PlayoffLogger.get('remote').debug( + 'Content encoding: %s', + encoding_match.group(2)) if encoding_match: request.encoding = encoding_match.group(2) cls.url_cache[url] = request.text |