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

[YouTube] Add support for attributed text description #953

Merged
merged 2 commits into from
Nov 3, 2022

Conversation

Theta-Dev
Copy link
Contributor

YouTube is currently A/B testing a new video description format. The new format includes chips with the YouTube icon for internal links, as shown below:

image

Internally the new format does not use a list of text components but a string with the entire plaintext content along with a list of commandRuns which include the link data. I included a sample file for testing (attributed_description.json).

Because NewPipeExtractor falls back to the description extracted from the player endpoint, being unable to extract the new description format does not cause any issues when using NewPipe. However this should fix the description unit tests.

@TobiGr TobiGr added the youtube service, https://www.youtube.com/ label Oct 24, 2022
Copy link
Member

@AudricV AudricV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, please revert the test changes which are unrelated to your PR (Bandcamp + PeerTube + Learning playlist) and address the comments above.

Also update the mock of the next InnerTube endpoint response of the
YoutubeStreamExtractorDefaultTest.DescriptionTestUnboxing test class with an
attributedDescription instead of a regular description
@AudricV
Copy link
Member

AudricV commented Nov 2, 2022

I resolved the conflicts, rebased the PR, removed the test changes (please open a separate PR for that), improved a bit the documentation of the method you added and squashed all the commits, as they were redundant.

Thanks for your hard work!

@Theta-Dev Theta-Dev requested a review from Stypox November 3, 2022 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants