globocom / m3u8

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

support for parsing extended #EXTM3U header #324

Open johnyxpro opened 12 months ago

johnyxpro commented 12 months ago

Hi, This pull request add the support for parsing extended #EXTM3U header, for extended M3U playlists with custom attrubutes.

See: https://github.com/AlexanderSofronov/iptv.example/blob/master/README.md https://vip-tv.online/forum/68-664-1 https://vk.com/wall278393568_10115

bbayles commented 12 months ago

For what it's worth, I think this type of parsing is far enough from RFC 8216 and its descendants to recommend using a different library.

davemevans commented 12 months ago

The title references #EXTM3U, but the code changes the #EXTINF parser.

Extended #EXTINF parsing is already well supported by using a custom tag parser to override builtin parsing: https://github.com/globocom/m3u8#custom-tags

johnyxpro commented 12 months ago

The title references #EXTM3U, but the code changes the #EXTINF parser.

Extended #EXTINF parsing is already well supported by using a custom tag parser to override builtin parsing: https://github.com/globocom/m3u8#custom-tags

Yes you are right. Unfortunately, there is a bit of confusion with the title. My pull request makes a small change (literally 1 line) to the #EXTINF parser which causes most iptv playlists to parse fine without errors and without involving custom tag parsers