Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generic extractor #20

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

PRESFIL
Copy link

@PRESFIL PRESFIL commented Jan 5, 2021

I tried using this plugin with anything other than YouTube and found a few problem areas. Hope you find these edits helpful. I've mostly researched gerenic extractor, but hopefully this helps with other problems (#19, #16, #8, #5, #4) as well.

Thanks for creation of this useful script!

With `-J` options `generic` extractor may return *nonflat* `formats`
field every format as separate videos. `-j` option *flatten* all
formats together.
Some extractors may also return `null` value. See [1][1].

[1]: ytdl-org/youtube-dl#27679
On some sites `youtube-dl` cannot fetch width/height and returns `nil`.
This breaks sorting. Now 1 used as default value as neutral
multiplication element.
Some sites cannot stream audio and video separately. Because of that,
every change of format with causes fullbacking to `best`, which is not
intended. Current fallback option is best, because it also guaranteed to
work, because it manually retrieved.
In the previous commit, I too lightly discarded the constant that played
the role of *default-case*. I return it and apologize.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant