tfx: disable checking mime type in get_json - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 2a958499b635a18d39fdf9a5e354306258917ffe
DIR parent f38ec93ae9555f6df47547baa92b13013b3cf18c
HTML Author: SomberNight <somber.night@protonmail.com>
Date: Sat, 15 Sep 2018 00:30:43 +0200
fx: disable checking mime type in get_json
looking at you, CoinDesk..
Diffstat:
M electrum/exchange_rate.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
DIR diff --git a/electrum/exchange_rate.py b/electrum/exchange_rate.py
t@@ -47,7 +47,8 @@ class ExchangeBase(PrintError):
url = ''.join(['https://', site, get_string])
async with make_aiohttp_session(Network.get_instance().proxy) as session:
async with session.get(url) as response:
- return await response.json()
+ # set content_type to None to disable checking MIME type
+ return await response.json(content_type=None)
async def get_csv(self, site, get_string):
raw = await self.get_raw(site, get_string)