-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement a parser simular youtubei.js #15
Comments
Hi,
I know the parsing could be improved but I simply don't have the time currently to implement that. I'm looking at youtubei.js either way hence they figured out deciphering of some parans but if you however want to open a PR or could maybe provide me a UML diagram of a parser you have in mind it woud truly be very helpful.
I will look into it either way I just can't promise it will be in the next release I'm planning.
|
Thanks for the response. I'll look into it. I just wanted to create an issue for tracking the progress. |
So I thought about it and the main problem we would face is that we have to use type |
I think fetching any data should return a Result so we could propagate any parsing errors. YouTube.js's parser is mostly typesafe, so maybe some inspiration could be taken. |
Is there any kind of InnerTube schema that can be used to validate the JSON? |
Nope, hence I chose the option to parse via serde_json |
But using serde_json has the disadvantage of not given good error messages but is also easy to use |
Currently, this project uses error-prone and difficult to maintain manual parsing for each response type. Implementing a YouTube.js-inspired parser would help to get rid of unnecessary unwraps, add a layer of abstraction for creating new API endpoints, and make the project more maintainable. Maybe a macro could be made for parsing the InnerTube responses.
The text was updated successfully, but these errors were encountered: