Traceback (most recent call last):
File "run.py", line 2, in
anime9.download('https://9anime.to/watch/sword-art-online.5y9/m2932p')
File "/Users/Darek/Dropbox/Anime/9anime/anime9.py", line 212, in download
directLink = get_mp4(episode['id'])[-1]['file']
File "/Users/Darek/Dropbox/Anime/9anime/anime9.py", line 84, in get_mp4
details = requests.get(constants.INFO_API, params=payload, headers=headers, cookies = cookies).json()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/models.py", line 886, in json
return complexjson.loads(self.text, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/simplejson/init.py", line 516, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/simplejson/decoder.py", line 374, in decode
obj, end = self.raw_decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/simplejson/decoder.py", line 404, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Try decoding the content to UTF, but also got that it was invalid.
Edited the code to get more info about the get request on line 84 and got this
content : b'\x01@\x00\x00 -\xa2\xb3\xd77%\x99d\x93\xb2\xb8\xc6-\xa9\xdc\x00\x03'
text : @ -���7%�d����-��
Tried converting content to UTF, but another decode error. Am I doing something wrong?