Skip to content

Extract Uploader's Avatar on YouTube and PeerTube#723

Merged
TobiGr merged 5 commits intoTeamNewPipe:devfrom
FireMasterK:uploader-avatar
Sep 3, 2021
Merged

Extract Uploader's Avatar on YouTube and PeerTube#723
TobiGr merged 5 commits intoTeamNewPipe:devfrom
FireMasterK:uploader-avatar

Conversation

@FireMasterK
Copy link
Copy Markdown
Member

@FireMasterK FireMasterK commented Sep 1, 2021

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

This pull request adds support for Channel Avatars extraction in the StreamInfoItem class.

@FireMasterK FireMasterK force-pushed the uploader-avatar branch 2 times, most recently from 0281832 to 00c8f2e Compare September 1, 2021 18:45
@Stypox
Copy link
Copy Markdown
Member

Stypox commented Sep 1, 2021

Thank you @FireMasterK! Could you add some description? Does this add support for channel avatars of stream info items?

@FireMasterK
Copy link
Copy Markdown
Member Author

FireMasterK commented Sep 1, 2021

Thank you @FireMasterK! Could you add some description? Does this add support for channel avatars of stream info items?

Done! It indeed does, this currently only works in the Search and Trending pages I believe as YouTube doesn't provide these anywhere else.

Copy link
Copy Markdown
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Looks almost good to me :-)

Comment thread extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItem.java Outdated
Copy link
Copy Markdown
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

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

I think this can also be tested roughly in DefaultTests.defaultTestListOfItems().

Please remove throws ParsingException when overriding the method and returning null

FireMasterK and others added 2 commits September 2, 2021 16:14
Co-authored-by: Tobi <TobiGr@users.noreply.github.com>
@FireMasterK
Copy link
Copy Markdown
Member Author

I think this can also be tested roughly in DefaultTests.defaultTestListOfItems().

What about services which in which it's not extracted in? Another thing to note is that even on YouTube, it's not provided everywhere.

@AudricV AudricV changed the title Extract Uploader's Avatar on YouTube. Extract Uploader's Avatar on YouTube and PeerTube Sep 2, 2021
@AudricV AudricV added enhancement New feature or request PeerTube Service, https://joinpeertube.org/ YouTube Service, https://www.youtube.com/ labels Sep 2, 2021
@TobiGr
Copy link
Copy Markdown
Contributor

TobiGr commented Sep 3, 2021

Testing this should be similar to testing the thumbnail URL

            final String uploaderAvatarUrl = item.getUploaderAvatarUrl();
            if (!isNullOrEmpty(uploaderAvatarUrl)) {
                assertIsSecureUrl(uploaderAvatarUrl);
            }

@FireMasterK
Copy link
Copy Markdown
Member Author

Testing this should be similar to testing the thumbnail URL

            final String uploaderAvatarUrl = item.getUploaderAvatarUrl();
            if (!isNullOrEmpty(uploaderAvatarUrl)) {
                assertIsSecureUrl(uploaderAvatarUrl);
            }

Added, thanks for the clarification on what you meant!

@TobiGr TobiGr merged commit c8037f5 into TeamNewPipe:dev Sep 3, 2021
@FireMasterK FireMasterK deleted the uploader-avatar branch September 3, 2021 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PeerTube Service, https://joinpeertube.org/ YouTube Service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants