Closed dlarrick closed 1 month ago
@dlarrick sorry for the late reply. Reading the test and code, I could not see where the quotes were added. Can you show us an example?
The code has changed a little. New line numbers:
https://github.com/globocom/m3u8/blob/master/m3u8/parser.py#L349 adds video_range
to the list of fields that will be de-quoted, if needed.
However, a subsequent line overwrites this behavior by declaring that video_range
is to be treated as str
: https://github.com/globocom/m3u8/blob/master/m3u8/parser.py#L349
As the original ticket #289 suggests, m3u8 is not supposed to have quotes around the video_range. But we do encounter such files in the wild, even from some of the major streaming content providers.
@dlarrick Now I get it. The code works fine when video-range does not come with quotes, however, it does not remove the quotes when it happens.
Greetings,
The fix for quoted VIDEO-RANGE properties in #289 is necessary but not sufficient.
That fix, https://github.com/globocom/m3u8/blob/master/m3u8/parser.py#L328 , adds video_range to the list of fields that will be de-quoted if needed. However, https://github.com/globocom/m3u8/blob/master/m3u8/parser.py#L337 overwrites this assignment with plain str so video_range does not, in fact, have quotes removed. This line should be removed.
Thanks!