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

bug: YouTube Links with Additional Junk #49

Open
onkoe opened this issue Jun 10, 2023 · 2 comments
Open

bug: YouTube Links with Additional Junk #49

onkoe opened this issue Jun 10, 2023 · 2 comments

Comments

@onkoe
Copy link

onkoe commented Jun 10, 2023

When submitting a YouTube link with some additional junk (stuff behind the first query), such as https://www.youtube.com/watch?v=CDWHVRqhfto&t=930s, you find that the parser often can't keep up: json error: invalid type: floating point \930`, expected a string`

Is this expected behavior? If so, could you please tell me if there's a way to skip the error and continue serving the downloaded file? It is certainly on my hard drive after a YoutubeDl::new..., but the error prevents me from confidently using the file.

Many thanks,
Barrett

@GyrosOfWar
Copy link
Owner

I'm gonna guess that doesn't actually have anything to do with the URL itself, I guess that passing the time offset changes some fields in the output JSON, which then causes errors because the JSON output doesn't match the schema in the library.

@GyrosOfWar
Copy link
Owner

The new version (0.9.0) now supports returning the JSON as a serde_json::Value so that you don't have to rely on the struct definitions matching the JSON (because of the nature of how youtube-dl/yt-dlp work, it's difficult to make an exact schema)

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