From b1ac74b2862cee3dc5eca219aec92733b32e3622 Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 11 Apr 2021 16:42:37 +0200 Subject: [PATCH 1/2] Initial rework --- README.md | 41 +++++++++++++------ app/fetchers/channel.js | 67 +++++-------------------------- app/fetchers/playlist.js | 71 ++++++-------------------------- app/helper.js | 76 ++++++++++++++++++++++++++++++++--- app/youtube-grabber.js | 87 ++++++++++++---------------------------- 5 files changed, 145 insertions(+), 197 deletions(-) diff --git a/README.md b/README.md index 60e2d4f..fc58166 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,19 @@ import ytch from 'yt-channel-info' ## API -**getChannelInfo(channelId)** +**getChannelInfo(channelId, [channelIdType])** Returns information about a given channel ID. +The optional argument 'channelIdType' can be provided to get faster results and less network requests if the type of channel id is known. +- `0` = Default value used by the module. It will try all url types in the order channel -> user -> name +- `1` = A channel id that is used with `https://www.youtube.com/channel/channelId` urls +- `2` = A user id that is used with `https://www.youtube.com/user/channelId` urls +- `3` = A name id that is used with `https://www.youtube.com/c/channelId` urls ```javascript const channelId = 'UCXuqSBlHAE6Xw-yeJA0Tunw' -ytch.getChannelInfo(channelId).then((response) => { +ytch.getChannelInfo(channelId, channelIdType).then((response) => { console.log(response) }).catch((err) => { console.log(err) @@ -56,10 +61,11 @@ ytch.getChannelInfo(channelId).then((response) => { relatedChannels: Array[Object], allowedRegions: Array[String], isVerified: Boolean, + channelIdType: Number, } ``` -**getChannelVideos(channelId, [sortBy])** +**getChannelVideos(channelId, [sortBy], [channelIdType])** Grabs videos from a given channel ID. @@ -67,11 +73,13 @@ Grabs videos from a given channel ID. - `oldest` - Grabs videos from a channel sorted by oldest videos - `popular` - Grabs videos from a channel sorted by the most popular (Highest amount of views) + +- `channelIdType` defined as for `getChannelInfo()` ```javascript const channelId = 'UCXuqSBlHAE6Xw-yeJA0Tunw' const sortBy = 'newest' -ytch.getChannelVideos(channelId, sortBy).then((response) => { +ytch.getChannelVideos(channelId, sortBy, channelIdType).then((response) => { console.log(response) }).catch((err) => { console.log(err) @@ -80,7 +88,8 @@ ytch.getChannelVideos(channelId, sortBy).then((response) => { // Response object { items: Array[Object], - continuation: String // Will return null if no more results can be found. Used with getChannelVideosMore() + continuation: String, // Will return null if no more results can be found. Used with getChannelVideosMore() + channelIdType: Number, } ``` @@ -104,18 +113,21 @@ ytch.getChannelInfoMore(continuation).then((response) => { } ``` - **getChannelPlaylistInfo(channelId, [sortBy])** + **getChannelPlaylistInfo(channelId, [sortBy], [channelIdType])** Grabs playlist information of a given channel ID. - `last` - Grabs playlists from a channel sorted by the most recently updated playlist (Default option if none given) - `newest` - Grabs playlists from a channel sorted by the creation date (newest first) - ```javascript + +- `channelIdType` defined as for `getChannelInfo()` + +```javascript const channelId = 'UCXuqSBlHAE6Xw-yeJA0Tunw' const sortBy = 'last' -ytch.getChannelPlaylistInfo(channelId, sortBy).then((response) => { +ytch.getChannelPlaylistInfo(channelId, sortBy, channelIdType).then((response) => { console.log(response) }).catch((err) => { console.log(err) @@ -125,6 +137,7 @@ ytch.getChannelPlaylistInfo(channelId, sortBy).then((response) => { { items: Array[Object], continuation: String // Will return null if no more results can be found. Used with getChannelPlaylistsMore() + channelIdType: Number, } ``` @@ -190,11 +203,12 @@ ytch.searchChannelMore(continuation).then((response) => { ``` -**getChannelCommunityPosts(channelId, authorURL)** +**getChannelCommunityPosts(channelId, [channelIdType])** + +Searches for all posts on the community page of a given channelId based on the given query. + +- `channelIdType` defined as for `getChannelInfo()` -Searchs for all posts on the community page of a given channelId based on the given query. -While the channelId is required as a fallback, a authorURL can be provided optionally to require one request to YouTube less. -If the author URL fails, then it will fallback to the authorURL and try to access the page normally. ```javascript const channelId = 'UCXuqSBlHAE6Xw-yeJA0Tunw' @@ -209,7 +223,8 @@ ytch.getChannelCommunityPosts(channelId, authorURL='http://www.youtube.com/c/cCh { items: Array[Object], // Described below continuation: String, // Will return null if no more results can be found. Used with searchChannelMore() - innerTubeApi: String + innerTubeApi: String, + channelIdType: Number, } ``` diff --git a/app/fetchers/channel.js b/app/fetchers/channel.js index 9a8b50c..8432d1c 100644 --- a/app/fetchers/channel.js +++ b/app/fetchers/channel.js @@ -2,71 +2,22 @@ const helper = require('../helper') class YoutubeChannelFetcher { constructor(id, continuation) { - this._url = `https://youtube.com/channel/${id}/` this.continuation = continuation } - static async getChannelVideosNewest (channelId) { - const channelUrl = `https://youtube.com/channel/${channelId}/videos?flow=grid&view=0&pbj=1` - let channelPageResponse = await helper.makeChannelRequest(channelUrl) - - if (channelPageResponse.error) { - // Try again as a user channel - const userUrl = `https://youtube.com/user/${channelId}/videos?flow=grid&view=0&pbj=1` - channelPageResponse = await helper.makeChannelRequest(userUrl) - - if (channelPageResponse.error) { - const cUrl = `https://youtube.com/c/${channelId}/videos?flow=grid&view=0&pbj=1` - channelPageResponse = await helper.makeChannelRequest(cUrl) - if (channelPageResponse.error) { - return Promise.reject(channelPageResponse.message) - } - } - } - - return await helper.parseChannelVideoResponse(channelPageResponse, channelId) + static async getChannelVideosNewest (channelId, channelIdType) { + const channelPageResponse = await helper.decideUrlRequestType(channelId, 'videos?flow=grid&view=0&pbj=1', channelIdType) + return await helper.parseChannelVideoResponse(channelPageResponse.response, channelId, channelPageResponse.channelIdType) } - static async getChannelVideosOldest (channelId) { - const channelUrl = `https://youtube.com/channel/${channelId}/videos?view=0&sort=da&flow=grid&pbj=1` - let channelPageResponse = await helper.makeChannelRequest(channelUrl) - - if (channelPageResponse.error) { - // Try again as a user channel - const userUrl = `https://youtube.com/user/${channelId}/videos?view=0&sort=da&flow=grid&pbj=1` - channelPageResponse = await helper.makeChannelRequest(userUrl) - - if (channelPageResponse.error) { - const cUrl = `https://youtube.com/c/${channelId}/videos?view=0&sort=da&flow=grid&pbj=1` - channelPageResponse = await helper.makeChannelRequest(cUrl) - if (channelPageResponse.error) { - return Promise.reject(channelPageResponse.message) - } - } - } - - return await helper.parseChannelVideoResponse(channelPageResponse, channelId) + static async getChannelVideosOldest (channelId, channelIdType) { + const channelPageResponse = await helper.decideUrlRequestType(channelId, 'videos?view=0&sort=da&flow=grid&pbj=1', channelIdType) + return await helper.parseChannelVideoResponse(channelPageResponse.response, channelId, channelPageResponse.channelIdType) } - static async getChannelVideosPopular (channelId) { - const channelUrl = `https://youtube.com/channel/${channelId}/videos?view=0&sort=p&flow=grid&pbj=1` - let channelPageResponse = await helper.makeChannelRequest(channelUrl) - - if (channelPageResponse.error) { - // Try again as a user channel - const userUrl = `https://youtube.com/user/${channelId}/videos?view=0&sort=p&flow=grid&pbj=1` - channelPageResponse = await helper.makeChannelRequest(userUrl) - - if (channelPageResponse.error) { - const cUrl = `https://youtube.com/c/${channelId}/videos?view=0&sort=p&flow=grid&pbj=1` - channelPageResponse = await helper.makeChannelRequest(cUrl) - if (channelPageResponse.error) { - return Promise.reject(channelPageResponse.message) - } - } - } - - return await helper.parseChannelVideoResponse(channelPageResponse, channelId) + static async getChannelVideosPopular (channelId, channelIdType) { + const channelPageResponse = await helper.decideUrlRequestType(channelId, 'videos?view=0&sort=p&flow=grid&pbj=1', channelIdType) + return await helper.parseChannelVideoResponse(channelPageResponse.response, channelId, channelPageResponse.channelIdType) } } diff --git a/app/fetchers/playlist.js b/app/fetchers/playlist.js index 31901a4..e1d1a54 100644 --- a/app/fetchers/playlist.js +++ b/app/fetchers/playlist.js @@ -6,70 +6,22 @@ class PlaylistFetcher { this.getOriginalURL = () => _url } - static async getChannelPlaylistLast (channelId) { - const channelUrl = `https://youtube.com/channel/${channelId}/playlists?flow=grid&sort=lad&view=1&pbj=1` - let channelPageResponse = await helper.makeChannelRequest(channelUrl) - - if (channelPageResponse.error) { - // Try again as a user channel - const userUrl = `https://youtube.com/user/${channelId}/playlists?flow=grid&view=1&pbj=1` - channelPageResponse = await helper.makeChannelRequest(userUrl) - - if (channelPageResponse.error) { - const cUrl = `https://youtube.com/c/${channelId}/playlists?flow=grid&view=1&pbj=1` - channelPageResponse = await helper.makeChannelRequest(cUrl) - if (channelPageResponse.error) { - return Promise.reject(channelPageResponse.message) - } - } - } - - return await this.parseChannelPlaylistResponse(channelPageResponse) + static async getChannelPlaylistLast (channelId, channelIdType) { + const channelPageResponse = await helper.decideUrlRequestType(channelId, 'playlists?flow=grid&sort=lad&view=1&pbj=1', channelIdType) + return await this.parseChannelPlaylistResponse(channelPageResponse.response, channelPageResponse.channelIdType) } - static async getChannelPlaylistOldest (channelId) { - const channelUrl = `https://youtube.com/channel/${channelId}/playlists?view=1&sort=da&flow=grid&pbj=1` - let channelPageResponse = await helper.makeChannelRequest(channelUrl) - - if (channelPageResponse.error) { - // Try again as a user channel - const userUrl = `https://youtube.com/user/${channelId}/playlists?view=1&sort=da&flow=grid&pbj=1` - channelPageResponse = await helper.makeChannelRequest(userUrl) - - if (channelPageResponse.error) { - const cUrl = `https://youtube.com/c/${channelId}/playlists?view=1&sort=da&flow=grid&pbj=1` - channelPageResponse = await helper.makeChannelRequest(cUrl) - if (channelPageResponse.error) { - return Promise.reject(channelPageResponse.message) - } - } - } - - return await this.parseChannelPlaylistResponse(channelPageResponse) + static async getChannelPlaylistOldest (channelId, channelIdType) { + const channelPageResponse = await helper.decideUrlRequestType(channelId, 'playlists?view=1&sort=da&flow=grid&pbj=1', channelIdType) + return await this.parseChannelPlaylistResponse(channelPageResponse.response, channelPageResponse.channelIdType) } - static async getChannelPlaylistNewest (channelId) { - const channelUrl = `https://youtube.com/channel/${channelId}/playlists?view=1&sort=dd&flow=grid&pbj=1` - let channelPageResponse = await helper.makeChannelRequest(channelUrl) - - if (channelPageResponse.error) { - // Try again as a user channel - const userUrl = `https://youtube.com/user/${channelId}/playlists?view=1&sort=dd&flow=grid&pbj=1` - channelPageResponse = await helper.makeChannelRequest(userUrl) - - if (channelPageResponse.error) { - const cUrl = `https://youtube.com/c/${channelId}/playlists?view=1&sort=dd&flow=grid&pbj=1` - channelPageResponse = await helper.makeChannelRequest(cUrl) - if (channelPageResponse.error) { - return Promise.reject(channelPageResponse.message) - } - } - } - - return await this.parseChannelPlaylistResponse(channelPageResponse) + static async getChannelPlaylistNewest (channelId, channelIdType) { + const channelPageResponse = await helper.decideUrlRequestType(channelId, 'playlists?view=1&sort=dd&flow=grid&pbj=1', channelIdType) + return await this.parseChannelPlaylistResponse(channelPageResponse.response, channelPageResponse.channelIdType) } - static async parseChannelPlaylistResponse (response) { + static async parseChannelPlaylistResponse (response, channelIdType) { const channelMetaData = response.data[1].response.metadata.channelMetadataRenderer const channelName = channelMetaData.title const channelId = channelMetaData.externalId @@ -110,7 +62,8 @@ class PlaylistFetcher { return { continuation: continuation, - items: playlistItems + items: playlistItems, + channelIdType: channelIdType, } } } diff --git a/app/helper.js b/app/helper.js index 433c574..0847c33 100644 --- a/app/helper.js +++ b/app/helper.js @@ -56,7 +56,7 @@ class YoutubeGrabberHelper { } } - async parseChannelVideoResponse(response, channelId) { + async parseChannelVideoResponse(response, channelId, channelIdType) { const channelMetaData = response.data[1].response.metadata.channelMetadataRenderer const channelName = channelMetaData.title const channelVideoData = response.data[1].response.contents.twoColumnBrowseResultsRenderer.tabs[1].tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].gridRenderer @@ -92,7 +92,8 @@ class YoutubeGrabberHelper { return { items: latestVideos, - continuation: continuation + continuation: continuation, + channelIdType: channelIdType, } } @@ -174,7 +175,7 @@ class YoutubeGrabberHelper { } } - parseCommunityPage(communityInfo) { + parseCommunityPage(communityInfo, channelIdType) { // A broader match approach to the whole JSON is required, because trackingParams can now occur in polls // Get the JSON data as string let contentDataString = communityInfo.data.match(/ytInitialData.+?(?=;<\/script>)/)[0] @@ -188,9 +189,9 @@ class YoutubeGrabberHelper { let contentDataJSON = JSON.parse(contentDataString) contentDataJSON = contentDataJSON.contents.twoColumnBrowseResultsRenderer.tabs[3].tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer if ('continuationItemRenderer' in contentDataJSON.contents[contentDataJSON.contents.length - 1]) { - return { items: this.createCommunityPostArray(contentDataJSON.contents), continuation: contentDataJSON.contents[contentDataJSON.contents.length - 1].continuationItemRenderer.continuationEndpoint.continuationCommand.token, innerTubeApi: innertubeAPIkey } + return { items: this.createCommunityPostArray(contentDataJSON.contents), continuation: contentDataJSON.contents[contentDataJSON.contents.length - 1].continuationItemRenderer.continuationEndpoint.continuationCommand.token, innerTubeApi: innertubeAPIkey, channelIdType: channelIdType } } - return { items: this.createCommunityPostArray(contentDataJSON.contents), continuation: null, innerTubeApi: null } + return { items: this.createCommunityPostArray(contentDataJSON.contents), continuation: null, innerTubeApi: null, channelIdType: channelIdType } } createCommunityPostArray(postArray) { @@ -336,6 +337,71 @@ class YoutubeGrabberHelper { const metaTags = $('meta[name="title"]') return metaTags.length !== 0 } + + async decideUrlRequestType(channelId, urlAppendix, channelIdType) { + switch (channelIdType) { + case 0: return this.performChannelPageRequestWithFallbacks(channelId, urlAppendix) + case 1: return this.performChannelUrlRequest(channelId, urlAppendix) + case 2: return this.performUserUrlRequest(channelId, urlAppendix) + case 3: return this.performCUrlRequest(channelId, urlAppendix) + default: return this.performChannelPageRequestWithFallbacks(channelId, urlAppendix) + } + } + + async performChannelPageRequestWithFallbacks(channelId, urlAppendix) { + const ajaxUrl = `https://youtube.com/channel/${channelId}/${urlAppendix}` + let workedUrl = 1 + let channelPageResponse = await this.makeChannelRequest(ajaxUrl) + + if (channelPageResponse.error) { + // Try again as a user channel + const userUrl = `https://youtube.com/user/${channelId}/${urlAppendix}` + channelPageResponse = await this.makeChannelRequest(userUrl) + workedUrl = 2 + if (channelPageResponse.error) { + const cUrl = `https://youtube.com/c/${channelId}/${urlAppendix}` + channelPageResponse = await this.makeChannelRequest(cUrl) + workedUrl = 3 + if (channelPageResponse.error) { + return Promise.reject(channelPageResponse.message) + } + } + } + return { response: channelPageResponse, channelIdType: workedUrl } + } + + async performChannelUrlRequest(channelId, urlAppendix) { + const ajaxUrl = `https://youtube.com/channel/${channelId}/${urlAppendix}` + + const channelPageResponse = await this.makeChannelRequest(ajaxUrl) + + if (channelPageResponse.error) { + return Promise.reject(channelPageResponse.message) + } + return { response: channelPageResponse, channelIdType: 1 } + } + + async performUserUrlRequest(channelId, urlAppendix) { + const ajaxUrl = `https://youtube.com/user/${channelId}/${urlAppendix}` + + const channelPageResponse = await this.makeChannelRequest(ajaxUrl) + + if (channelPageResponse.error) { + return Promise.reject(channelPageResponse.message) + } + return { response: channelPageResponse, channelIdType: 2 } + } + + async performCUrlRequest(channelId, urlAppendix) { + const ajaxUrl = `https://youtube.com/c/${channelId}/${urlAppendix}` + + const channelPageResponse = await this.makeChannelRequest(ajaxUrl) + + if (channelPageResponse.error) { + return Promise.reject(channelPageResponse.message) + } + return { response: channelPageResponse, channelIdType: 3 } + } } module.exports = new YoutubeGrabberHelper() diff --git a/app/youtube-grabber.js b/app/youtube-grabber.js index 58677a0..7177515 100644 --- a/app/youtube-grabber.js +++ b/app/youtube-grabber.js @@ -7,28 +7,14 @@ const YoutubePlaylistFetcher = require('./fetchers/playlist') class YoutubeGrabber { /** - * Get channel information. Full list of channel information you can find in README.md file - * @param { string } channelId The channel id to grab data from. - * @return { Promise } Return channel information - * */ - static async getChannelInfo(channelId) { - const channelUrl = `https://youtube.com/channel/${channelId}/channels?flow=grid&view=0&pbj=1` - - let channelPageResponse = await YoutubeGrabberHelper.makeChannelRequest(channelUrl) - - if (channelPageResponse.error) { - // Try again as a user channel - const userUrl = `https://youtube.com/user/${channelId}/channels?flow=grid&view=0&pbj=1` - channelPageResponse = await YoutubeGrabberHelper.makeChannelRequest(userUrl) - - if (channelPageResponse.error) { - const cUrl = `https://youtube.com/c/${channelId}/channels?flow=grid&view=0&pbj=1` - channelPageResponse = await YoutubeGrabberHelper.makeChannelRequest(cUrl) - if (channelPageResponse.error) { - return Promise.reject(channelPageResponse.message) - } - } - } + * Get channel information. Full list of channel information you can find in README.md file + * @param { string } channelId The channel id to grab data from. + * @param { string } channelIdType (optional) The type of id a channel id can be 1 = /channel/, 2= /user/, 3=/c/. + * @return { Promise } Return channel information + * */ + static async getChannelInfo(channelId, channelIdType = 0) { + const decideResponse = await YoutubeGrabberHelper.decideUrlRequestType(channelId, 'channels?flow=grid&view=0&pbj=1', channelIdType) + const channelPageResponse = decideResponse.response if (typeof (channelPageResponse.data[1].response.alerts) !== 'undefined') { const alert = channelPageResponse.data[1].response.alerts[0].alertRenderer.text.simpleText @@ -129,21 +115,22 @@ class YoutubeGrabber { relatedChannels: relatedChannels, allowedRegions: channelMetaData.availableCountryCodes, isVerified: isVerified, + channelIdType: decideResponse.channelIdType, } return channelInfo } - static async getChannelVideos (channelId, sortBy = 'newest') { + static async getChannelVideos (channelId, sortBy = 'newest', channelIdType = 0) { switch (sortBy) { case 'popular': - return await YoutubeChannelFetcher.getChannelVideosPopular(channelId) + return await YoutubeChannelFetcher.getChannelVideosPopular(channelId, channelIdType) case 'newest': - return await YoutubeChannelFetcher.getChannelVideosNewest(channelId) + return await YoutubeChannelFetcher.getChannelVideosNewest(channelId, channelIdType) case 'oldest': - return await YoutubeChannelFetcher.getChannelVideosOldest(channelId) + return await YoutubeChannelFetcher.getChannelVideosOldest(channelId, channelIdType) default: - return await YoutubeChannelFetcher.getChannelVideosNewest(channelId) + return await YoutubeChannelFetcher.getChannelVideosNewest(channelId, channelIdType) } } @@ -198,17 +185,17 @@ class YoutubeGrabber { } } - static async getChannelPlaylistInfo (channelId, sortBy = 'last') { + static async getChannelPlaylistInfo (channelId, sortBy = 'last', channelIdType = 0) { switch (sortBy) { case 'last': - return await YoutubePlaylistFetcher.getChannelPlaylistLast(channelId) + return await YoutubePlaylistFetcher.getChannelPlaylistLast(channelId, channelIdType) case 'oldest': console.warn("yt-channel-info: Fetching by oldest isn't available in YouTube any more. This option will be removed in a later update.") - return await YoutubePlaylistFetcher.getChannelPlaylistOldest(channelId) + return await YoutubePlaylistFetcher.getChannelPlaylistOldest(channelId, channelIdType) case 'newest': - return await YoutubePlaylistFetcher.getChannelPlaylistNewest(channelId) + return await YoutubePlaylistFetcher.getChannelPlaylistNewest(channelId, channelIdType) default: - return await YoutubePlaylistFetcher.getChannelPlaylistLast(channelId) + return await YoutubePlaylistFetcher.getChannelPlaylistLast(channelId, channelIdType) } } @@ -264,30 +251,16 @@ class YoutubeGrabber { } } - static async searchChannel(channelId, query = '') { + static async searchChannel(channelId, query = '', channelIdType = 0) { const urlParams = queryString.stringify({ query: query, flow: 'grid', view: 0, pbj: 1 }) - const ajaxUrl = `https://youtube.com/channel/${channelId}/search?${urlParams}` - let channelPageResponse = await YoutubeGrabberHelper.makeChannelRequest(ajaxUrl) - - if (channelPageResponse.error) { - // Try again as a user channel - const userUrl = `https://youtube.com/user/${channelId}/search?${urlParams}` - channelPageResponse = await YoutubeGrabberHelper.makeChannelRequest(userUrl) - - if (channelPageResponse.error) { - const cUrl = `https://youtube.com/c/${channelId}/search?${urlParams}` - channelPageResponse = await YoutubeGrabberHelper.makeChannelRequest(cUrl) - if (channelPageResponse.error) { - return Promise.reject(channelPageResponse.message) - } - } - } + const decideResponse = await YoutubeGrabberHelper.decideUrlRequestType(channelId, `search?${urlParams}`, channelIdType) + const channelPageResponse = decideResponse.response const channelMetaData = channelPageResponse.data[1].response.metadata.channelMetadataRenderer const channelName = channelMetaData.title @@ -395,19 +368,9 @@ class YoutubeGrabber { } } - static async getChannelCommunityPosts(channelId, authorURL = null) { - const requestURL = (authorURL !== null) ? ((authorURL[authorURL.length - 1] === '/') ? `${authorURL}community` : `${authorURL}/community`) : `https://www.youtube.com/channel/${channelId}/community` - let channelPageResponse = await YoutubeGrabberHelper.makeChannelRequest(requestURL) - if (channelPageResponse.error) { - channelPageResponse = await YoutubeGrabberHelper.makeChannelRequest(`https://www.youtube.com/user/${channelId}/community`) - if (channelPageResponse.error) { - channelPageResponse = await YoutubeGrabberHelper.makeChannelRequest(`https://www.youtube.com/c/${channelId}/community`) - if (channelPageResponse.error) { - return Promise.reject(channelPageResponse.message) - } - } - } - return YoutubeGrabberHelper.parseCommunityPage(channelPageResponse) + static async getChannelCommunityPosts(channelId, channelIdType = 0) { + const channelPageResponse = await YoutubeGrabberHelper.decideUrlRequestType(channelId, 'community', channelIdType) + return YoutubeGrabberHelper.parseCommunityPage(channelPageResponse.response, channelPageResponse.channelIdType) } static async getChannelCommunityPostsMore(continuation, innerAPIKey) { From dcaa6e64e8e24ae4cce0bb8b60e892b60f3f3a16 Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 11 Apr 2021 17:07:41 +0200 Subject: [PATCH 2/2] Bumped module version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 64b5ce4..3b3ef17 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yt-channel-info", - "version": "2.0.0", + "version": "2.1.0", "description": "Grab YouTube channel information without any official API", "main": "index.js", "scripts": {