~cadence/tube#26: 
"Unknown download error" on videos blocked on copyright grounds could be more explicit

This video is blocked in France with "This video includes content from SME, who has blocked it in your country on copyright grounds".

So it's blocked on my instance, but the error is not helpful, I only get Unknown download error, while the error raised by ytdlc has Video unavailable at least.

Would you be OK appending the error message from ytdlc to the error returned by Second API? I have a patch ready.

Ideally we would return the full error (which implies geoblocking, though ytdlc doesn't raise a GeoRestrictedError here), but the error details ("This video includes content from SME, who has blocked it in your country on copyright grounds" here) are not included in the Exception by ytdlc.

Status
RESOLVED IMPLEMENTED
Submitter
~lomanic
Assigned to
No-one
Submitted
3 months ago
Updated
a month ago
Labels
newleaf

~cadence 3 months ago

Would you be OK appending the error message from ytdlc to the error returned by Second API? I have a patch ready.

For sure, let's do that! The returned error JSON structure is as follows:

  • error: A string describing the error. Invidious only includes this key. Ideally we'd want to return a somewhat similar string as it, so that clients can pattern match. "Blocked it in your country" should be sufficient.
  • identifier: A string that specifies the exact kind of error for machines to use. Perhaps COPYRIGHT_BLOCKED_IN_COUNTRY would be ideal, but you can make up whatever identifier you think is appropriate.

Ideally we would return the full error (which implies geoblocking, though ytdlc doesn't raise a GeoRestrictedError here), but the error details ("This video includes content from SME, who has blocked it in your country on copyright grounds" here) are not included in the Exception by ytdlc.

I'm not sure what you mean here, mind elaborating?

~lomanic 3 months ago*

Here's my patch for Second currently http://0x0.st/-8uC.diff

On my instance hosted in France, Second returns the following JSON

{"error": "Unknown download error: Video unavailable"}

From what I see this is the best we can do in Second, as the full error "This video includes content from SME, who has blocked it in your country on copyright grounds" is not even returned in any way by ytdlc (for the moment, but ytclc seems dormant for a while so it's unlikely to be fixed there, see also #27).

On a side note, with this patch applied, this private video shows a more helpful message in Cloudtube telling there's a bug in ytdlc (this branch with the bug report message is entered), so this is also an improvement from my point of view than just a short "Unknown download error".

~lomanic REPORTED IMPLEMENTED 2 months ago

~cadence 2 months ago

So does this mean that the reason for the error is not "unknown" anymore?

~lomanic a month ago

So does this mean that the reason for the error is not "unknown" anymore?

I think I just understood that remark, yes, we could/should remove the Unknown download error: part in the error.

Also, what I wrote about youtube-dlc not returning the full error (just "Video unavailable") doesn't apply to yt-dlp/youtube-dl, these libraries return complete errors, see https://www.youtube.com/watch?v=hXi6hrRh0J8 as another example (uploader deleted his account) or just the videos previously mentioned in this discussion.

~cadence a month ago

I made these changes.

Register here or Log in to comment, or comment via email.