-
Notifications
You must be signed in to change notification settings - Fork 7
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
JSONDecodeError #8
Comments
Don't specify some json file as the cookie. Use the cookie value itself |
Hi, I'm not very sure if I'm using the correct cookie values. Please find the attached and kindly verify if I'm using the correct one. Initially, the cookie parameter never worked for me. So, what I did was to hard code the "yiihuu_s_c_d" value in main.py. After doing this only I was able to download my other courses that start with 20XXXX without any issue, except for fragment issue in few videos. But, this course I noticed that it start with 15XXXX and I'm getting errors. |
Your cookie is the value for PHPSESSID or the yiihuu_s_c_d as it's the same value. Remember the command isn't going to automatically download all videos in a playlist. You'll need to provide and replace the video_id for each video in the playlist. You shouldn't need to modify main.py or any other files. Make sure you are using Python 3.12 and not any other version. |
You're getting the error because they're responding with an unencrypted manifest, which can be easily implemented. The hard part is that they're also encrypting the MPEGTS header differently than before, which I haven't solved yet. |
@DevLARLEY, noted on the unencrypted manifest and encrypting the MPEGTS header differently. Anyway, I'm getting the following error in python 3.12. (wingfox) jeyamir@WIN-J03RE1NFNF3:~/wingfox-downloader$ python main.py --id 159176 --cookie hbrub4oofksd35d50v64reob0m --subtitles --debug During handling of the above exception, another exception occurred: Traceback (most recent call last): |
I've added support for unencrypted manifests in this commit: 314e025 |
Today, I was trying to download the following course: https://www.wingfox.com/p/8328/159176 and I'm getting following error:
....:~/wingfox-downloader$ python main.py --id 159176 --cookie cookies.json --subtitles --debug
[DEBUG]: Starting new HTTPS connection (1): api.wingfox.com:443
[DEBUG]: https://api.wingfox.com:443 "GET /api/album/get_video_url?play_video_id=159176 HTTP/1.1" 200 None
[DEBUG]: Starting new HTTPS connection (1): player.polyv.net:443
[DEBUG]: https://player.polyv.net:443 "GET /secure/9215d65496a063cad141a8f46b0891e3_9.json HTTP/1.1" 200 None
seed_const => 26
hlsLevel => web
hlsPrivate => None
[DEBUG]: Starting new HTTPS connection (1): hls.videocc.net:443
[DEBUG]: https://hls.videocc.net:443 "GET /9215d65496/3/9215d65496a063cad141a8f46b0891e3_1.m3u8?device=desktop HTTP/1.1" 200 1642
Traceback (most recent call last):
File ".../lib/python3.10/site-packages/requests/models.py", line 963, in json
return complexjson.loads(self.content.decode(encoding), **kwargs)
File ".../lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File ".../lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File ".../lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jeyamir/wingfox-downloader/main.py", line 344, in
manifest_data = dl.get_m3u8(decrypted_body)
File "/home/jeyamir/wingfox-downloader/main.py", line 110, in get_m3u8
enc_m3u8 = hls_request.json()['body']
File ".../lib/python3.10/site-packages/requests/models.py", line 971, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The text was updated successfully, but these errors were encountered: