-
Notifications
You must be signed in to change notification settings - Fork 425
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
Conversation
...or/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelperTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
Outdated
Show resolved
Hide resolved
...or/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelperTest.java
Outdated
Show resolved
Hide resolved
...or/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelperTest.java
Outdated
Show resolved
Hide resolved
Also update the mock of the next InnerTube endpoint response of the YoutubeStreamExtractorDefaultTest.DescriptionTestUnboxing test class with an attributedDescription instead of a regular description
74a5ef7
to
099b53c
Compare
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! |
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:
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.