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

Get a list of subscribed channels #63

Closed
walking-octopus opened this issue May 31, 2022 · 8 comments · Fixed by #560
Closed

Get a list of subscribed channels #63

walking-octopus opened this issue May 31, 2022 · 8 comments · Fixed by #560
Labels
enhancement New feature or request good first issue Good for newcomers priority: medium Stale
Milestone

Comments

@walking-octopus
Copy link

walking-octopus commented May 31, 2022

Expected Behavior

Allow receiving a list of channels the user is subscribed to.

Sample Code

const channels = await youtube.getChannelList();

{
  channels: [
    id: string,
    name: string,
    url: string
  ]
}
@walking-octopus walking-octopus added the enhancement New feature or request label May 31, 2022
@walking-octopus
Copy link
Author

youtube.actions.browse("FEchannels") can provide a list of subscribed channels. All that's left is a bit of parsing. Thanks for marking this as a good first issue, encouraging me to look into how the library I depend on works.

@walking-octopus
Copy link
Author

walking-octopus commented Jun 8, 2022

I tried parsing the response. I'm not familiar with how the proper parser works, but here's my attempt. It misses feed continuations but seems to work fine.

let channels = await youtube.actions.browse("FEchannels");
channels = channels.data.contents.twoColumnBrowseResultsRenderer.tabs[0].tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].shelfRenderer.content.expandedShelfContentsRenderer.items;
// console.log(channels);

channels.forEach(item => {
    console.log(`${item.channelRenderer.title.simpleText} (${item.channelRenderer.channelId})`);
});

@LuanRT
Copy link
Owner

LuanRT commented Jun 9, 2022

I tried parsing the response. I'm not familiar with how the proper parser works, but here's my attempt. It misses feed continuations but seems to work fine.

let channels = await youtube.actions.browse("FEchannels");
channels = channels.data.contents.twoColumnBrowseResultsRenderer.tabs[0].tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].shelfRenderer.content.expandedShelfContentsRenderer.items;
// console.log(channels);

channels.forEach(item => {
    console.log(`${item.channelRenderer.title.simpleText} (${item.channelRenderer.channelId})`);
});

Nice! The new parser makes that much easier tho -- you can learn more about it here: #65. This feature will probably be implemented in the Library class.

@github-actions github-actions bot added the Stale label Jul 9, 2022
@walking-octopus
Copy link
Author

I don't think this should be closed yet.

@LuanRT LuanRT removed the Stale label Jul 9, 2022
Repository owner deleted a comment from github-actions bot Jul 9, 2022
@Wykerd Wykerd added this to the v2 milestone Jul 13, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Aug 26, 2022
@LuanRT LuanRT removed the Stale label Aug 26, 2022
@walking-octopus
Copy link
Author

Sorry for not getting around to this for so long. So many things to do lately.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Oct 26, 2022
@LuanRT LuanRT removed the Stale label Oct 26, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers priority: medium Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants