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]: Fixed channel continuation #539

Merged
merged 1 commit into from
Feb 12, 2021

Conversation

B0pol
Copy link
Member

@B0pol B0pol commented Feb 12, 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.

Closes TeamNewPipe/NewPipe#5550

@B0pol B0pol changed the title YT channels: fix continuation [YouTube]: Fixed channel continuation Feb 12, 2021
@B0pol B0pol added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Feb 12, 2021
@B0pol B0pol mentioned this pull request Feb 12, 2021
5 tasks
@@ -252,36 +250,47 @@ public String getParentChannelAvatarUrl() throws ParsingException {
final JsonArray ajaxJson = getJsonResponse(page.getUrl(), getExtractorLocalization());

JsonObject sectionListContinuation = ajaxJson.getObject(1).getObject("response")
.getObject("continuationContents").getObject("gridContinuation");
.getArray("onResponseReceivedActions").getObject(0).getObject("appendContinuationItemsAction");
Copy link
Member

Choose a reason for hiding this comment

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

is it safe to assume that the appendContinuationItemsAction object is always in the first array element?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know

Copy link
Member Author

Choose a reason for hiding this comment

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

youtube-dl also assume it's the first element. https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L2507
but if you wanna be sure the safest way is a simple for loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants