|
@@ -329,7 +329,15 @@ class CookiesParser(Cacheable):
|
|
|
)
|
|
)
|
|
|
with open(outfile, "rb") as f:
|
|
with open(outfile, "rb") as f:
|
|
|
result = f.read()
|
|
result = f.read()
|
|
|
- result = result.decode("utf8")
|
|
|
|
|
|
|
+ # Rather then spend time understanding the format of the decrypted bytes
|
|
|
|
|
+ # (which does seem to vary), just throw out the first 8 bytes any time
|
|
|
|
|
+ # we don't get a valid ASCII string from decoding.
|
|
|
|
|
+ while True:
|
|
|
|
|
+ try:
|
|
|
|
|
+ result = result.decode("ascii")
|
|
|
|
|
+ break
|
|
|
|
|
+ except UnicodeDecodeError:
|
|
|
|
|
+ result = result[8:]
|
|
|
self._write_cache(cache_key, result)
|
|
self._write_cache(cache_key, result)
|
|
|
return result
|
|
return result
|
|
|
|
|
|