Странный json ответ (или что то не знаю):
>>>r = requests.get(url, params=data) >>>r.text '{} && {"tokenResponse":{"status":{"code":"200","message":""},"data":{"token":"fb34ec6f-37a8-4eb3-bb11-e26587f5fa2d","expiredIn":"25.09.2018 14:32"}}}' >>> r.json() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3/dist-packages/requests/models.py", line 850, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.5/json/__init__.py", line 319, in loads return _default_decoder.decode(s) File "/usr/lib/python3.5/json/decoder.py", line 342, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 1 column 4 (char 3)
Прошу подсказать, как быть в данной ситуации???
ps:
>>> r.headers {'Cache-Control': 'no-cache, no-store, max-age=0', 'Date': 'Tue, 25 Sep 2018 08:07:13 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Server': 'Apache-Coyote/1.1', 'Pragma': 'no-cache', 'Expires': 'Thu, 01 Jan 1970 00:00:00 GMT', 'Content-Language': 'en-US', 'Transfer-Encoding': 'chunked'}