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

This video requires payment to watch #40

Open
ShayBox opened this issue Mar 18, 2023 · 7 comments
Open

This video requires payment to watch #40

ShayBox opened this issue Mar 18, 2023 · 7 comments
Assignees

Comments

@ShayBox
Copy link
Contributor

ShayBox commented Mar 18, 2023

Error: non-zero exit code: 1, stderr: ERROR: [youtube] Ylb4jP1zTX0: This video requires payment to watch
ERROR: [youtube] iHg0p_pL9ZM: This video requires payment to watch
ERROR: [youtube] dR9S96jUey4: This video requires payment to watch
ERROR: [youtube] nSOAF9lGQLo: This video requires payment to watch


Caused by:
    non-zero exit code: 1, stderr: ERROR: [youtube] Ylb4jP1zTX0: This video requires payment to watch
    ERROR: [youtube] iHg0p_pL9ZM: This video requires payment to watch
    ERROR: [youtube] dR9S96jUey4: This video requires payment to watch
    ERROR: [youtube] nSOAF9lGQLo: This video requires payment to watch

Is there a way to fix this, skip the videos, etc?

@GyrosOfWar GyrosOfWar self-assigned this Mar 18, 2023
@GyrosOfWar
Copy link
Owner

What exactly are you trying to do?

@ShayBox
Copy link
Contributor Author

ShayBox commented Mar 18, 2023

Get video/channel data, this channel happens to have paid videos which crash yt-dlp, I just wanna skip the paid videos, I believe there's an ignore errors flag or something for that but youtube_dl would have to use that flag.

@GyrosOfWar
Copy link
Owner

Can you pass it manually? (with this method)

@ShayBox
Copy link
Contributor Author

ShayBox commented Mar 18, 2023

Ah I didn't see that, that'll work, thanks!
I believe the flag is --no-abort-on-error but it may and/or be --ignore-errors

@ShayBox ShayBox closed this as completed Mar 18, 2023
@GyrosOfWar
Copy link
Owner

Cool, glad I could help.

@ShayBox ShayBox reopened this Mar 18, 2023
@ShayBox
Copy link
Contributor Author

ShayBox commented Mar 18, 2023

This is related, would be nice to have JSON errors, or a way to filter out errors with a flag, but considering no progress over almost two years, I wouldn't count on it any time soon.
yt-dlp/yt-dlp#1659

@ShayBox
Copy link
Contributor Author

ShayBox commented Mar 19, 2023

To make my findings clearer, I've deleted my previous comments as they were contradictory.

I found that the --ignore-errors and --no-abort-on-error flags didn't do anything, or anything noticeable in this case.

I also found that the exit code of yt-dlp is always 1 if there's stderr, so the explicit success check prevents youtube_dl from parsing the valid JSON in stdout.

My suggestion would be an ignore_errors builder function to toggle a bool that skips the exit code check, but after that I ran into another problem, that the video that was premium/errored is "null" in the entries JSON which serde_json fails to parse into a Playlist struct.

JSON: https://pastebin.com/8e2YS6y0

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

No branches or pull requests

2 participants