jeckman / YouTube-Downloader

PHP script for downloading videos from youtube; also parsing youtube feed into RSS enclosures for podcatchers
GNU General Public License v2.0
895 stars 474 forks source link

Add alternative video info url for age restricted videos #316

Closed strellic closed 5 years ago

strellic commented 6 years ago

This PR fixes the handling of age restricted videos by making a request to another video info url if the normal one comes back with an error.

This should resolve #293 and allow age restricted videos like https://www.youtube.com/watch?v=owUZUdyRVcQ to run correctly.

As an example, http://www.youtube.com/get_video_info?&video_id=owUZUdyRVcQ&asv=3&el=detailpage&hl=en_US returns status=fail&reason=Sign+in+to+confirm+your+age&errordetail=1&errorcode=150

while the alternative url https://www.youtube.com/get_video_info?&video_id=owUZUdyRVcQ&asv=3&hl=en_US returns a valid response with no errors.

ghost commented 6 years ago

You should not implemented this feature

On Sat, Apr 14, 2018, 1:33 PM AntiTeal notifications@github.com wrote:

This PR fixes the handling of age restricted videos by making a request to another video info url if the normal one comes back with an error.

This should resolve #293 https://github.com/jeckman/YouTube-Downloader/issues/293 and allow age restricted videos like https://www.youtube.com/watch?v=owUZUdyRVcQ to run correctly.

As an example, http://www.youtube.com/get_video_info?&video_id=owUZUdyRVcQ&asv=3&el=detailpage&hl=en_US returns status=fail&reason=Sign+in+to+confirm+your+age&errordetail=1&errorcode=150

while the alternative url https://www.youtube.com/get_video_info?&video_id=owUZUdyRVcQ&asv=3&hl=en_US returns a valid response with no errors, like https://pastebin.com/zMSnvyDJ.


You can view, comment on, or merge this pull request online at:

https://github.com/jeckman/YouTube-Downloader/pull/316 Commit Summary

  • Add alternative video info url
  • age restriction unit tests

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jeckman/YouTube-Downloader/pull/316, or mute the thread https://github.com/notifications/unsubscribe-auth/AVahEA-Va-gmlnNWI9bveAT3nAEbe9lJks5toYpEgaJpZM4TU78T .

jeckman commented 6 years ago

@vladikvenger care to elaborate on your objection?

falahati commented 6 years ago

Just a question, What type of extra information does 'el=detailpage' provide? Why not simply change the video info url to the new one without 'el=detailpage'?

jeckman commented 5 years ago

no action on requested changes, not sure we even should implement override for age restricted videos

falahati commented 5 years ago

Since the name of the project is "YouTube-Downloader", I expect this project to download anything regardless of moral complexities as long as it is hosted on YT.

The moral problem with age restriction videos has nothing to do with this project and is something that the user of this project should decide how to solve.

jeckman commented 5 years ago

So submit a working pull request that passes code review and I'll consider including it - until then the debate is purely academic

falahati commented 5 years ago

These changes are already included as part of #365.

I was just trying to say that we don't need to argue about the issue of morality.