Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
How to return formats without url for some m3u8 playlists? #25172
Comments
No.
Not possible.
This is error prone as this requires partial reimplementation of format selection mechanism at extractor level that is overkill. This almost definitely won't work properly in all cases. Unless there is a severe throttling/limitations from a site itself you should not bother with such optimisations at all and just extract all formats available making all necessary request in a standard extraction run. |
Checklist
Question
I'm developing extractor for additional site (wetv.vip) to be exactly.
Videos there are in m3u8 media playlist without m3u8 master playlist.
When you request metadata of any video you select desired quality level in one of http headers.
In response you will receive several urls for same m3u8 media playlist (those which contains
#EXT-X-TARGETDURATION tag).Also there list of all available qualities for this video (usually same for all videos on site but not always). Only information this list contains in name of quality which you can use to request different quality.
Is it possible to return some entry within
formatsfield ininfo_dictwhich will have no url?In this case for
--list-formatsI want to output just list of formats (url is not needed for this).If I do not enter
--skip-downloadI could check parameter--formatviaself._downloader.params.get('format').If user enter named format I will just request it and return url.
If user enter format not from list (
bestfor example) after checking if default quality does not matched with videos metadata I will make another request this best quality from returned quality list.