freyta / WWE-Network-Downloader

My own WWE downloader.
40 stars 13 forks source link

NoneType is not subscriptable #32

Closed WilhelDe closed 8 months ago

WilhelDe commented 8 months ago

Hi Freyta,

i'm trying to download all episodes of WWE 24 documentary series. It worked for almost all episodes, only one is not working:

Succesfully logged in Traceback (most recent call last): File "/media/wilhelde/Daten/WWE24/main.py", line 102, in stream_url = account.m3u8_stream(video_link[1]) File "/media/wilhelde/Daten/WWE24/wwe.py", line 96, in m3u8_stream return stream['hls'][0]['url'], subtitle_stream, stream['annotations']['titles'] TypeError: 'NoneType' object is not subscriptable

It's this episode: https://network.wwe.com/video/85591 and all downloads were started with this command: python3 main.py -f -s -t

i tried python3 main.py -t https://network.wwe.com/video/85591 without success, I tried the master fork, patch-1 and patch-2, Linux and Windows as Host.

can someone tell me, what's going wrong?

freyta commented 8 months ago

I don't have a paid subscription to the international Network, so I can't actually download that video to try it. If you can upload the result from the m3u8_stream function in wwe.py to either here or on pastebin.com then I can try and diagnose the problem.

On line 89 you can simply add print(stream) and then send through the result, so I can try and figure out what isn't actually downloading.

WilhelDe commented 8 months ago

good morning australia :)

i just added the line and this is the output:

Succesfully logged in {'watermark': None, 'skipMarkers': [], 'annotations': None, 'smoothStreaming': [{'subtitles': [{'format': 'vtt', 'language': 'en-US', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/vtt/subtitle-en-US-184988-1687935458972.vtt'}, {'format': 'srt', 'language': 'en-US', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/srt/subtitle-en-US-184988-1687935458792.srt'}, {'format': 'scc', 'language': 'en-US', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/scc/subtitle-en-US-184988-1687935458846.scc'}, {'format': 'vtt', 'language': 'es-419', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/vtt/subtitle-es-419-184989-1687935459807.vtt'}, {'format': 'srt', 'language': 'es-419', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/srt/subtitle-es-419-184989-1687935459605.srt'}, {'format': 'scc', 'language': 'es-419', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/scc/subtitle-es-419-184989-1687935459702.scc'}], 'url': 'https://dve-streams.akamaized.net/ns-001/MjAxOQ/Nw/OQ/MTMz-ODgz_/U01PT1RIX1NUUkVBTUlORw/MQ/Manifest?hdnea=exp=1710623150~acl=/ns-001/MjAxOQ/Nw/OQ/MTMz-ODgz_/U01PT1RIX1NUUkVBTUlORw/MQ/*~id=e548f0c1-e8b6-4f04-ae6e-7124e89ab290~hmac=dacdfc5655804a0cf1e75e901072a732b0d142ab3d40270d47bd5758346353f1'}], 'dash': [{'subtitles': [{'format': 'vtt', 'language': 'en-US', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/vtt/subtitle-en-US-184988-1687935458972.vtt'}, {'format': 'srt', 'language': 'en-US', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/srt/subtitle-en-US-184988-1687935458792.srt'}, {'format': 'scc', 'language': 'en-US', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/scc/subtitle-en-US-184988-1687935458846.scc'}, {'format': 'vtt', 'language': 'es-419', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/vtt/subtitle-es-419-184989-1687935459807.vtt'}, {'format': 'srt', 'language': 'es-419', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/srt/subtitle-es-419-184989-1687935459605.srt'}, {'format': 'scc', 'language': 'es-419', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/scc/subtitle-es-419-184989-1687935459702.scc'}], 'url': 'https://dve-streams.akamaized.net/ns-001/MjAxOQ/Nw/OQ/MTMz-ODgz_/REFTSA/MQ/master.mpd?hdnea=exp=1710623150~acl=/ns-001/MjAxOQ/Nw/OQ/MTMz-ODgz_/REFTSA/MQ/*~id=e548f0c1-e8b6-4f04-ae6e-7124e89ab290~hmac=b637efe292cb01efe554ba73b0d880813a0feee97196afa102242412f398a667'}], 'hls': [{'subtitles': [{'format': 'vtt', 'language': 'en-US', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/vtt/subtitle-en-US-184988-1687935458972.vtt'}, {'format': 'srt', 'language': 'en-US', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/srt/subtitle-en-US-184988-1687935458792.srt'}, {'format': 'scc', 'language': 'en-US', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/scc/subtitle-en-US-184988-1687935458846.scc'}, {'format': 'vtt', 'language': 'es-419', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/vtt/subtitle-es-419-184989-1687935459807.vtt'}, {'format': 'srt', 'language': 'es-419', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/srt/subtitle-es-419-184989-1687935459605.srt'}, {'format': 'scc', 'language': 'es-419', 'url': 'https://dve-subtitles.imggaming.com/85591/133883/scc/subtitle-es-419-184989-1687935459702.scc'}], 'url': 'https://dve-streams.akamaized.net/ns-001/MjAxOQ/Nw/OQ/MTMz-ODgz_/SE-xT_/MQ/master.m3u8?hdnea=exp=1710623150~acl=/ns-001/MjAxOQ/Nw/OQ/MTMz-ODgz_/SE-xT_/MQ/*~id=e548f0c1-e8b6-4f04-ae6e-7124e89ab290~hmac=100533ad485e56bee12c895072029d099c3ef8e301ed5d57dee28161ab607127'}]} Traceback (most recent call last): File "/media/wilhelde/Daten/WWE24/main.py", line 102, in stream_url = account.m3u8_stream(video_link[1]) File "/media/wilhelde/Daten/WWE24/wwe.py", line 96, in m3u8_stream return stream['hls'][0]['url'], subtitle_stream, stream['annotations']['titles'] TypeError: 'NoneType' object is not subscriptable

or

https://pastebin.com/vYPnb0Qj

freyta commented 8 months ago

Can you try the patch I just made? I'm hoping that works.

There is still an error where if you set a custom start/end time it will write all the chapters, but that's for another day.

WilhelDe commented 8 months ago

works like a charm! 👍