crunchy-xml-decoder
crunchy-xml-decoder copied to clipboard
Download error
Hi, I receive this error:
Same error here. It happens only with this URL (tested some others randomly but no problem): http://www.crunchyroll.com/berserk/episode-12-those-who-cling-those-who-struggle-715003
@Klicksoe works for me here. Can you add a print video
just before the assert?
Here it is.
print(video) :
<m3u8.model.M3U8 object at 0x7f34730bd4d0>
print(video.dict) (1 "keys"):
{'files': ['http://serve.cxcdn.net/s/v/pne7 [...] '], '_base_path': None, 'playlist_type': 'vod', 'version': '3', 'keys': [<m3u8.model.Key object at 0x7f34730bd590>], 'program_date_time': None, 'segments': [<m3u8.model.Segment object [...] ] , 'allow_cache': None, '_base_uri': 'http://serve.cxcdn.net/s/v/pne7spj6xd01hbm/2832385/', 'iframe_playlists': [], 'is_endlist': True, 'media_sequence': 0, 'is_independent_segments': False, 'target_duration': 7.0, 'media': [], 'is_variant': False, 'playlists': [], 'data': {'playlists': [], 'version': '3', 'is_endlist': True, 'media_sequence': 0, 'targetduration': 7.0, 'playlist_type': 'vod', 'media': [], 'segments': [{'title': '', 'discontinuity': False, 'uri': 'http://vid.ec.cxcdn.net/s/v/cranime/[video-0.ts]', 'cue_out': False, 'key': {'iv': '0x772853ec8331937caae344cea34e6bd4', 'method': 'AES-128', 'uri': 'http://serve.cxcdn.net/s/v/[steam.key]'}, 'duration': 5.213544}, {'title': '' [...]
Object(video.keys):
#EXT-X-KEY:METHOD=AES-128,URI="http://serve.cxcdn.net/s/v/pne7spj6xd01hbm/2832385/stream.key?k=MWFwWWV5RVdSV094VnEzMXNyV0N0eHMrQ3AwPV97ImEiOiI5MSw2LGphSlAsIiwiYyI6MTQ3NDkxMjc4NSwiZCI6ImNyYW5pbWUiLCJnIjoiWloiLCJoIjoicG5lN3NwajZ4ZDAxaGJtIiwiaSI6IjEwLjAuMS4xMDQiLCJsIjo3MjAwLCJwIjoiMSIsInIiOiJjMzBkODIiLCJzIjozMjA3MjMsInQiOjE0NzYxMzM1NzksInYiOjN9&v=26339baae297eb4a27bdd08d5c34df49",IV=0x772853ec8331937caae344cea34e6bd4
Wait, which version of m3u8 do you have installed? It seems like there was an API-breaking update at the start of the month.
I just installed it using pip and it's version 0.3.0 with lastest version of iso8601 (0.1.11) and python 2.7.6.
Right, that explains it. If you ask for 0.2.10, you will have more luck for now. Need to look at the API changes...
OK. I understand how your code works now. I thought it was another tricky Python trick that made your code works with m3u8 0.3...
@Reign5
pip uninstall m3u8 -y
pip install m3u8==0.2.10
Thanks.
@Klicksoe Thanks, fix the error :)
Anyway, i noticed that videos downloaded with m3u8 0.3.0 have a better output Bit rate (3 072 kb/s instead of 2200 kb/s~ with 0.2.10). Hope that this bug with 0.3 will be resolved :)
m3u8 doesn't do downloads, it only parses the playlist...
I don't know why but i noticed that after trying on the same URL ^^
#98 adds support for newer m3u8.