Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Decode Error #11

Open
darekj28 opened this issue Jun 13, 2017 · 3 comments
Open

JSON Decode Error #11

darekj28 opened this issue Jun 13, 2017 · 3 comments

Comments

@darekj28
Copy link

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?

@Yureien
Copy link
Contributor

Yureien commented Jun 15, 2017

Hey, 9anime has done some anti bot things. Please wait till the code is updated.

@Yureien
Copy link
Contributor

Yureien commented Jul 7, 2017

This repo is moved here: anime_scrapers. Please use it instead.

@Yureien
Copy link
Contributor

Yureien commented Oct 31, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants