globocom / m3u8

Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions
Other
2.03k stars 471 forks source link

ValueError: not enough values to unpack #275

Closed pandamoon21 closed 2 years ago

pandamoon21 commented 2 years ago

Hi, I'm trying to load an m3u8 and got an exception. I'll post the URL here so it can be checked by the dev,


url = "https://apionvod6.seezntv.com:443/ktmain1/cold/CP/50175/202202/media/MZWM101VSGL150000100_DRM/MZWM101VSGL150000100_subtitle_KOR.m3u8?sid=0000036000000040016800000F200000"

m3u8.load(url)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\itsme\AppData\Local\Programs\Python\Python39\lib\site-packages\m3u8\__init__.py", line 47, in load
    return M3U8(content, base_uri=base_uri, custom_tags_parser=custom_tags_parser)
  File "C:\Users\itsme\AppData\Local\Programs\Python\Python39\lib\site-packages\m3u8\model.py", line 147, in __init__
    self.data = parse(content, strict, custom_tags_parser)
  File "C:\Users\itsme\AppData\Local\Programs\Python\Python39\lib\site-packages\m3u8\parser.py", line 150, in parse
    _parse_simple_parameter(line, data)
  File "C:\Users\itsme\AppData\Local\Programs\Python\Python39\lib\site-packages\m3u8\parser.py", line 367, in _parse_simple_parameter
    return _parse_and_set_simple_parameter_raw_value(line, data, cast_to, True)
  File "C:\Users\itsme\AppData\Local\Programs\Python\Python39\lib\site-packages\m3u8\parser.py", line 361, in _parse_and_set_simple_parameter_raw_value
    param, value = _parse_simple_parameter_raw_value(line, cast_to, normalize)
  File "C:\Users\itsme\AppData\Local\Programs\Python\Python39\lib\site-packages\m3u8\parser.py", line 353, in _parse_simple_parameter_raw_value
    param, value = line.split(':', 1)
ValueError: not enough values to unpack (expected 2, got 1)
mauricioabreu commented 2 years ago

Thank you! @pandamoon21 We're investigating what may have caused this error.

mauricioabreu commented 2 years ago

Your playlist has a little problem. The second line is #EXT-X-PLAYLIST-TYPE=VOD but it should be #EXT-X-PLAYLIST-TYPE:VOD with a colon separating the tag from the value.

mauricioabreu commented 2 years ago

Closing. If you think the reason to close this issue was not valid, reopen, please