Extract additional playlist page type & related video link #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From your comments on the previous version of this pull:
My bad, I missed it somehow, now it is done properly.
I want to be done with this as well. :) As for the copy/paste: the very reason why I'm trying to write this code so I don't have to do that ever again.
How about a middle road? This patch handles all three formats - for now. Incorporate it at the moment and open an issue about doing it properly. I would feel weird if there is a known case that the code could understand but instead breaks on it, which would be the case if the single video link is not explicitly handled.
As I tried, if I remove the single video special case and pass it the third kind of link, it would start downloading the "newest videos" or something like that (completely unrelated to the original video/playlist), so wouldn't even malfunction properly but unexpectedly from the user's point of view. The check to make it fail the right way (as I can see) would look exactly like this patch, just returning with some excuse instead of the single video download...
What do you think? :)