youtubei 0.0.1-rc.8 → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +50 -53
- package/dist/cjs/classes/Base/Base.js +10 -0
- package/dist/cjs/classes/Base/index.js +13 -0
- package/dist/cjs/classes/BaseChannel/BaseChannel.js +31 -0
- package/dist/cjs/classes/BaseChannel/BaseChannelParser.js +24 -0
- package/dist/cjs/classes/BaseChannel/ChannelPlaylists.js +57 -0
- package/dist/cjs/classes/BaseChannel/ChannelVideos.js +57 -0
- package/dist/cjs/classes/BaseChannel/index.js +16 -0
- package/dist/cjs/classes/BaseVideo/BaseVideo.js +34 -0
- package/dist/cjs/classes/BaseVideo/BaseVideoParser.js +82 -0
- package/dist/cjs/classes/BaseVideo/VideoRelated.js +39 -0
- package/dist/cjs/classes/BaseVideo/index.js +15 -0
- package/dist/cjs/classes/Channel/Channel.js +24 -0
- package/dist/cjs/classes/Channel/ChannelParser.js +55 -0
- package/dist/cjs/classes/Channel/index.js +14 -0
- package/dist/cjs/classes/Chat/Chat.js +23 -0
- package/dist/cjs/classes/Chat/ChatParser.js +21 -0
- package/dist/cjs/classes/Chat/index.js +14 -0
- package/dist/cjs/classes/Client/Client.js +101 -0
- package/dist/cjs/classes/Client/HTTP.js +59 -0
- package/dist/cjs/classes/Client/index.js +13 -0
- package/dist/cjs/classes/Comment/Comment.js +29 -0
- package/dist/cjs/classes/Comment/CommentParser.js +43 -0
- package/dist/cjs/classes/Comment/CommentReplies.js +36 -0
- package/dist/cjs/classes/Comment/index.js +15 -0
- package/dist/cjs/classes/Continuable/Continuable.js +43 -0
- package/dist/cjs/classes/Continuable/index.js +13 -0
- package/dist/cjs/classes/LiveVideo/LiveVideo.js +84 -0
- package/dist/cjs/classes/LiveVideo/LiveVideoParser.js +29 -0
- package/dist/cjs/classes/LiveVideo/index.js +14 -0
- package/dist/cjs/classes/MixPlaylist/MixPlaylist.js +25 -0
- package/dist/cjs/classes/MixPlaylist/MixPlaylistParser.js +27 -0
- package/dist/cjs/classes/MixPlaylist/index.js +14 -0
- package/dist/cjs/classes/Playlist/Playlist.js +25 -0
- package/dist/cjs/classes/Playlist/PlaylistParser.js +83 -0
- package/dist/cjs/classes/Playlist/PlaylistVideos.js +50 -0
- package/dist/cjs/classes/Playlist/index.js +15 -0
- package/dist/cjs/classes/PlaylistCompact/PlaylistCompact.js +45 -0
- package/dist/cjs/classes/PlaylistCompact/PlaylistCompactParser.js +28 -0
- package/dist/cjs/classes/PlaylistCompact/index.js +14 -0
- package/dist/cjs/classes/Reply/Reply.js +23 -0
- package/dist/cjs/classes/Reply/ReplyParser.js +26 -0
- package/dist/cjs/classes/Reply/index.js +14 -0
- package/dist/cjs/classes/SearchResult/SearchResult.js +85 -0
- package/dist/cjs/classes/SearchResult/SearchResultParser.js +40 -0
- package/dist/cjs/classes/SearchResult/index.js +14 -0
- package/dist/cjs/classes/SearchResult/proto/SearchProto.js +2 -0
- package/dist/cjs/classes/SearchResult/proto/index.js +57 -0
- package/dist/{classes → cjs/classes/Thumbnails}/Thumbnails.js +67 -50
- package/dist/cjs/classes/Thumbnails/index.js +13 -0
- package/dist/cjs/classes/Video/Video.js +26 -0
- package/dist/cjs/classes/Video/VideoComments.js +53 -0
- package/dist/cjs/classes/Video/VideoParser.js +29 -0
- package/dist/cjs/classes/Video/index.js +15 -0
- package/dist/cjs/classes/VideoCompact/VideoCompact.js +49 -0
- package/dist/cjs/classes/VideoCompact/VideoCompactParser.js +36 -0
- package/dist/cjs/classes/VideoCompact/index.js +14 -0
- package/dist/cjs/classes/index.js +29 -0
- package/dist/{common → cjs/common}/decorators.js +14 -15
- package/dist/cjs/common/helper.js +45 -0
- package/dist/{common → cjs/common}/index.js +16 -23
- package/dist/{common → cjs/common}/mixins.js +14 -12
- package/dist/{common → cjs/common}/types.js +2 -2
- package/dist/{constants.js → cjs/constants.js} +10 -10
- package/dist/{index.js → cjs/index.js} +13 -13
- package/dist/esm/classes/Base/Base.js +8 -0
- package/dist/esm/classes/Base/index.js +1 -0
- package/dist/esm/classes/BaseChannel/BaseChannel.js +48 -0
- package/dist/esm/classes/BaseChannel/BaseChannelParser.js +24 -0
- package/dist/esm/classes/BaseChannel/ChannelPlaylists.js +109 -0
- package/dist/esm/classes/BaseChannel/ChannelVideos.js +109 -0
- package/dist/esm/classes/BaseChannel/index.js +4 -0
- package/dist/esm/classes/BaseVideo/BaseVideo.js +51 -0
- package/dist/esm/classes/BaseVideo/BaseVideoParser.js +93 -0
- package/dist/esm/classes/BaseVideo/VideoRelated.js +87 -0
- package/dist/esm/classes/BaseVideo/index.js +3 -0
- package/dist/esm/classes/Channel/Channel.js +37 -0
- package/dist/esm/classes/Channel/ChannelParser.js +77 -0
- package/dist/esm/classes/Channel/index.js +2 -0
- package/dist/esm/classes/Chat/Chat.js +36 -0
- package/dist/esm/classes/Chat/ChatParser.js +21 -0
- package/dist/esm/classes/Chat/index.js +2 -0
- package/dist/esm/classes/Client/Client.js +176 -0
- package/dist/esm/classes/Client/HTTP.js +112 -0
- package/dist/esm/classes/Client/index.js +1 -0
- package/dist/esm/classes/Comment/Comment.js +46 -0
- package/dist/esm/classes/Comment/CommentParser.js +45 -0
- package/dist/esm/classes/Comment/CommentReplies.js +84 -0
- package/dist/esm/classes/Comment/index.js +3 -0
- package/dist/esm/classes/Continuable/Continuable.js +125 -0
- package/dist/esm/classes/Continuable/index.js +1 -0
- package/dist/esm/classes/LiveVideo/LiveVideo.js +160 -0
- package/dist/esm/classes/LiveVideo/LiveVideoParser.js +29 -0
- package/dist/esm/classes/LiveVideo/index.js +2 -0
- package/dist/esm/classes/MixPlaylist/MixPlaylist.js +38 -0
- package/dist/esm/classes/MixPlaylist/MixPlaylistParser.js +49 -0
- package/dist/esm/classes/MixPlaylist/index.js +2 -0
- package/dist/esm/classes/Playlist/Playlist.js +38 -0
- package/dist/esm/classes/Playlist/PlaylistParser.js +105 -0
- package/dist/esm/classes/Playlist/PlaylistVideos.js +98 -0
- package/dist/esm/classes/Playlist/index.js +3 -0
- package/dist/esm/classes/PlaylistCompact/PlaylistCompact.js +90 -0
- package/dist/esm/classes/PlaylistCompact/PlaylistCompactParser.js +28 -0
- package/dist/esm/classes/PlaylistCompact/index.js +2 -0
- package/dist/esm/classes/Reply/Reply.js +36 -0
- package/dist/esm/classes/Reply/ReplyParser.js +26 -0
- package/dist/esm/classes/Reply/index.js +2 -0
- package/dist/esm/classes/SearchResult/SearchResult.js +161 -0
- package/dist/esm/classes/SearchResult/SearchResultParser.js +62 -0
- package/dist/esm/classes/SearchResult/index.js +2 -0
- package/dist/esm/classes/SearchResult/proto/SearchProto.js +1 -0
- package/dist/esm/classes/SearchResult/proto/index.js +39 -0
- package/dist/esm/classes/Thumbnails/Thumbnails.js +109 -0
- package/dist/esm/classes/Thumbnails/index.js +1 -0
- package/dist/esm/classes/Video/Video.js +39 -0
- package/dist/esm/classes/Video/VideoComments.js +101 -0
- package/dist/esm/classes/Video/VideoParser.js +31 -0
- package/dist/esm/classes/Video/index.js +3 -0
- package/dist/esm/classes/VideoCompact/VideoCompact.js +98 -0
- package/dist/esm/classes/VideoCompact/VideoCompactParser.js +36 -0
- package/dist/esm/classes/VideoCompact/index.js +2 -0
- package/dist/esm/classes/index.js +17 -0
- package/dist/esm/common/decorators.js +30 -0
- package/dist/esm/common/helper.js +61 -0
- package/dist/esm/common/index.js +4 -0
- package/dist/esm/common/mixins.js +10 -0
- package/dist/esm/common/types.js +1 -0
- package/dist/esm/constants.js +7 -0
- package/dist/esm/index.js +1 -0
- package/dist/typings/classes/Base/Base.d.ts +11 -0
- package/dist/typings/classes/Base/index.d.ts +1 -0
- package/dist/typings/classes/BaseChannel/BaseChannel.d.ts +43 -0
- package/dist/typings/classes/BaseChannel/BaseChannelParser.d.ts +7 -0
- package/dist/typings/classes/BaseChannel/ChannelPlaylists.d.ts +30 -0
- package/dist/typings/classes/BaseChannel/ChannelVideos.d.ts +30 -0
- package/dist/typings/classes/BaseChannel/index.d.ts +4 -0
- package/dist/typings/classes/BaseVideo/BaseVideo.d.ts +59 -0
- package/dist/typings/classes/BaseVideo/BaseVideoParser.d.ts +14 -0
- package/dist/typings/classes/BaseVideo/VideoRelated.d.ts +21 -0
- package/dist/typings/classes/BaseVideo/index.d.ts +3 -0
- package/dist/typings/classes/Channel/Channel.d.ts +33 -0
- package/dist/typings/classes/Channel/ChannelParser.d.ts +6 -0
- package/dist/typings/classes/Channel/index.d.ts +2 -0
- package/dist/typings/classes/Chat/Chat.d.ts +33 -0
- package/dist/typings/classes/Chat/ChatParser.d.ts +5 -0
- package/dist/typings/classes/Chat/index.d.ts +2 -0
- package/dist/typings/classes/Client/Client.d.ts +41 -0
- package/dist/typings/classes/Client/HTTP.d.ts +21 -0
- package/dist/typings/classes/Client/index.d.ts +1 -0
- package/dist/typings/classes/Comment/Comment.d.ts +51 -0
- package/dist/typings/classes/Comment/CommentParser.d.ts +8 -0
- package/dist/typings/classes/Comment/CommentReplies.d.ts +17 -0
- package/dist/typings/classes/Comment/index.d.ts +3 -0
- package/dist/typings/classes/Continuable/Continuable.d.ts +24 -0
- package/dist/typings/classes/Continuable/index.d.ts +1 -0
- package/dist/typings/classes/LiveVideo/LiveVideo.d.ts +46 -0
- package/dist/typings/classes/LiveVideo/LiveVideoParser.d.ts +10 -0
- package/dist/typings/classes/LiveVideo/index.d.ts +2 -0
- package/dist/typings/classes/MixPlaylist/MixPlaylist.d.ts +29 -0
- package/dist/typings/classes/MixPlaylist/MixPlaylistParser.d.ts +6 -0
- package/dist/typings/classes/MixPlaylist/index.d.ts +2 -0
- package/dist/typings/classes/Playlist/Playlist.d.ts +39 -0
- package/dist/typings/classes/Playlist/PlaylistParser.d.ts +16 -0
- package/dist/typings/classes/Playlist/PlaylistVideos.d.ts +31 -0
- package/dist/typings/classes/Playlist/index.d.ts +3 -0
- package/dist/typings/classes/PlaylistCompact/PlaylistCompact.d.ts +43 -0
- package/dist/typings/classes/PlaylistCompact/PlaylistCompactParser.d.ts +5 -0
- package/dist/typings/classes/PlaylistCompact/index.d.ts +2 -0
- package/dist/typings/classes/Reply/Reply.d.ts +43 -0
- package/dist/typings/classes/Reply/ReplyParser.d.ts +5 -0
- package/dist/typings/classes/Reply/index.d.ts +2 -0
- package/dist/typings/classes/SearchResult/SearchResult.d.ts +53 -0
- package/dist/typings/classes/SearchResult/SearchResultParser.d.ts +13 -0
- package/dist/typings/classes/SearchResult/index.d.ts +2 -0
- package/dist/typings/classes/SearchResult/proto/SearchProto.d.ts +13 -0
- package/dist/typings/classes/SearchResult/proto/index.d.ts +24 -0
- package/dist/typings/classes/Thumbnails/Thumbnails.d.ts +41 -0
- package/dist/typings/classes/Thumbnails/index.d.ts +1 -0
- package/dist/typings/classes/Video/Video.d.ts +24 -0
- package/dist/typings/classes/Video/VideoComments.d.ts +34 -0
- package/dist/typings/classes/Video/VideoParser.d.ts +8 -0
- package/dist/typings/classes/Video/index.d.ts +3 -0
- package/dist/typings/classes/VideoCompact/VideoCompact.d.ts +57 -0
- package/dist/typings/classes/VideoCompact/VideoCompactParser.d.ts +5 -0
- package/dist/typings/classes/VideoCompact/index.d.ts +2 -0
- package/dist/typings/classes/index.d.ts +17 -0
- package/dist/{common → typings/common}/decorators.d.ts +5 -7
- package/dist/typings/common/helper.d.ts +5 -0
- package/dist/typings/common/index.d.ts +4 -0
- package/dist/typings/common/mixins.d.ts +1 -0
- package/dist/{common → typings/common}/types.d.ts +1 -2
- package/dist/{constants.d.ts → typings/constants.d.ts} +7 -7
- package/dist/{index.d.ts → typings/index.d.ts} +1 -1
- package/package.json +68 -53
- package/CHANGELOG.md +0 -6
- package/dist/classes/Base.d.ts +0 -8
- package/dist/classes/Base.js +0 -10
- package/dist/classes/Channel.d.ts +0 -63
- package/dist/classes/Channel.js +0 -115
- package/dist/classes/Chat.d.ts +0 -35
- package/dist/classes/Chat.js +0 -34
- package/dist/classes/Client.d.ts +0 -17
- package/dist/classes/Client.js +0 -59
- package/dist/classes/Comment.d.ts +0 -51
- package/dist/classes/Comment.js +0 -47
- package/dist/classes/LiveVideo.d.ts +0 -20
- package/dist/classes/LiveVideo.js +0 -59
- package/dist/classes/Playlist.d.ts +0 -66
- package/dist/classes/Playlist.js +0 -133
- package/dist/classes/PlaylistCompact.d.ts +0 -35
- package/dist/classes/PlaylistCompact.js +0 -47
- package/dist/classes/SearchResult.d.ts +0 -51
- package/dist/classes/SearchResult.js +0 -121
- package/dist/classes/Thumbnails.d.ts +0 -26
- package/dist/classes/Video.d.ts +0 -90
- package/dist/classes/Video.js +0 -153
- package/dist/classes/VideoCompact.d.ts +0 -46
- package/dist/classes/VideoCompact.js +0 -53
- package/dist/classes/index.d.ts +0 -12
- package/dist/classes/index.js +0 -30
- package/dist/common/helper.d.ts +0 -4
- package/dist/common/helper.js +0 -39
- package/dist/common/http.d.ts +0 -33
- package/dist/common/http.js +0 -105
- package/dist/common/index.d.ts +0 -5
- package/dist/common/mixins.d.ts +0 -2
package/dist/classes/Client.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const constants_1 = require("../constants");
|
|
13
|
-
const common_1 = require("../common");
|
|
14
|
-
const _1 = require(".");
|
|
15
|
-
/** Youtube Client */
|
|
16
|
-
class Client {
|
|
17
|
-
/** Searches for videos / playlists / channels */
|
|
18
|
-
search(query, searchOptions) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const options = Object.assign({ type: "all" }, searchOptions);
|
|
21
|
-
const result = new _1.SearchResult();
|
|
22
|
-
yield result.init(query, options);
|
|
23
|
-
return result;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
/** Search for videos / playlists / channels and returns the first result */
|
|
27
|
-
findOne(query, searchOptions) {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return (yield this.search(query, searchOptions)).shift();
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/** Get playlist information and its videos by playlist id or URL */
|
|
33
|
-
getPlaylist(playlistIdOrUrl) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const playlistId = common_1.getQueryParameter(playlistIdOrUrl, "list");
|
|
36
|
-
const response = yield common_1.http.post(`${constants_1.I_END_POINT}/browse`, {
|
|
37
|
-
data: { browseId: `VL${playlistId}` },
|
|
38
|
-
});
|
|
39
|
-
if (response.data.error || response.data.alerts)
|
|
40
|
-
return undefined;
|
|
41
|
-
return new _1.Playlist().load(response.data);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
/** Get video information by video id or URL */
|
|
45
|
-
getVideo(videoIdOrUrl) {
|
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
const videoId = common_1.getQueryParameter(videoIdOrUrl, "v");
|
|
48
|
-
const response = yield common_1.http.get(`${constants_1.WATCH_END_POINT}`, {
|
|
49
|
-
params: { v: videoId, pbj: "1" },
|
|
50
|
-
});
|
|
51
|
-
if (!response.data[3].response.contents)
|
|
52
|
-
return undefined;
|
|
53
|
-
return !response.data[2].playerResponse.playabilityStatus.liveStreamability
|
|
54
|
-
? new _1.Video().load(response.data)
|
|
55
|
-
: new _1.LiveVideo().load(response.data);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.default = Client;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Base, Channel, Video } from ".";
|
|
2
|
-
import { YoutubeRawData } from "../common";
|
|
3
|
-
/** @hidden */
|
|
4
|
-
interface CommentAttributes {
|
|
5
|
-
id: string;
|
|
6
|
-
video: Video;
|
|
7
|
-
author: Channel;
|
|
8
|
-
content: string;
|
|
9
|
-
publishDate: string;
|
|
10
|
-
likeCount: number;
|
|
11
|
-
isAuthorChannelOwner: boolean;
|
|
12
|
-
isPinnedComment: boolean;
|
|
13
|
-
replyCount: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Represents a Comment / Reply
|
|
17
|
-
*/
|
|
18
|
-
export default class Comment extends Base implements CommentAttributes {
|
|
19
|
-
/** The comment's ID */
|
|
20
|
-
id: string;
|
|
21
|
-
/** The video this comment belongs to */
|
|
22
|
-
video: Video;
|
|
23
|
-
/** The comment's author */
|
|
24
|
-
author: Channel;
|
|
25
|
-
/** The content of this comment */
|
|
26
|
-
content: string;
|
|
27
|
-
/** The publish date of the comment */
|
|
28
|
-
publishDate: string;
|
|
29
|
-
/** How many likes does this comment have */
|
|
30
|
-
likeCount: number;
|
|
31
|
-
/** Whether the comment is posted by the video uploader / owner */
|
|
32
|
-
isAuthorChannelOwner: boolean;
|
|
33
|
-
/** Whether the comment is pinned */
|
|
34
|
-
isPinnedComment: boolean;
|
|
35
|
-
/** Comment's reply count */
|
|
36
|
-
replyCount: number;
|
|
37
|
-
/** @hidden */
|
|
38
|
-
constructor(channel?: Partial<CommentAttributes>);
|
|
39
|
-
/**
|
|
40
|
-
* Load instance attributes from youtube raw data
|
|
41
|
-
*
|
|
42
|
-
* @param youtubeRawData raw object from youtubei
|
|
43
|
-
* @hidden
|
|
44
|
-
*/
|
|
45
|
-
load(data: YoutubeRawData): Comment;
|
|
46
|
-
/**
|
|
47
|
-
* URL to the video with this comment being highlighted (appears on top of the comment section)
|
|
48
|
-
*/
|
|
49
|
-
get url(): string;
|
|
50
|
-
}
|
|
51
|
-
export {};
|
package/dist/classes/Comment.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const _1 = require(".");
|
|
4
|
-
/**
|
|
5
|
-
* Represents a Comment / Reply
|
|
6
|
-
*/
|
|
7
|
-
class Comment extends _1.Base {
|
|
8
|
-
// TODO: Add replies
|
|
9
|
-
/** @hidden */
|
|
10
|
-
constructor(channel = {}) {
|
|
11
|
-
super();
|
|
12
|
-
Object.assign(this, channel);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Load instance attributes from youtube raw data
|
|
16
|
-
*
|
|
17
|
-
* @param youtubeRawData raw object from youtubei
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
load(data) {
|
|
21
|
-
const { authorText, authorThumbnail, authorEndpoint, contentText, publishedTimeText, commentId, likeCount, authorIsChannelOwner, pinnedCommentBadge, replyCount, } = data.comment.commentRenderer;
|
|
22
|
-
// Basic information
|
|
23
|
-
this.id = commentId;
|
|
24
|
-
this.content = contentText.runs.map((r) => r.text).join("");
|
|
25
|
-
this.publishDate = publishedTimeText.runs.shift().text;
|
|
26
|
-
this.likeCount = likeCount;
|
|
27
|
-
this.isAuthorChannelOwner = authorIsChannelOwner;
|
|
28
|
-
this.isPinnedComment = !!pinnedCommentBadge;
|
|
29
|
-
this.replyCount = replyCount;
|
|
30
|
-
// Author
|
|
31
|
-
const { browseId, canonicalBaseUrl } = authorEndpoint.browseEndpoint;
|
|
32
|
-
this.author = new _1.Channel({
|
|
33
|
-
id: browseId,
|
|
34
|
-
name: authorText.simpleText,
|
|
35
|
-
thumbnails: new _1.Thumbnails().load(authorThumbnail.thumbnails),
|
|
36
|
-
url: "https://www.youtube.com" + (canonicalBaseUrl || `/channel/${browseId}`),
|
|
37
|
-
});
|
|
38
|
-
return this;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* URL to the video with this comment being highlighted (appears on top of the comment section)
|
|
42
|
-
*/
|
|
43
|
-
get url() {
|
|
44
|
-
return `https://www.youtube.com?watch=${this.video.id}&lc=${this.id}`;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.default = Comment;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { YoutubeRawData } from "../common";
|
|
2
|
-
import { Chat, Video } from ".";
|
|
3
|
-
interface LiveVideoEvents {
|
|
4
|
-
chat: (chat: Chat) => void;
|
|
5
|
-
}
|
|
6
|
-
declare interface LiveVideo {
|
|
7
|
-
on<T extends keyof LiveVideoEvents>(event: T, listener: LiveVideoEvents[T]): this;
|
|
8
|
-
emit<T extends keyof LiveVideoEvents>(event: T, ...args: Parameters<LiveVideoEvents[T]>): boolean;
|
|
9
|
-
}
|
|
10
|
-
declare class LiveVideo extends Video {
|
|
11
|
-
delay: number;
|
|
12
|
-
private _chatRequestPoolingTimeout;
|
|
13
|
-
private _chatContinuation;
|
|
14
|
-
private _timeoutMs;
|
|
15
|
-
private _chatQueue;
|
|
16
|
-
load(data: YoutubeRawData): LiveVideo;
|
|
17
|
-
playChat(delay?: number): Promise<void>;
|
|
18
|
-
parseChat(data: YoutubeRawData): Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
export default LiveVideo;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const events_1 = require("events");
|
|
13
|
-
const common_1 = require("../common");
|
|
14
|
-
const _1 = require(".");
|
|
15
|
-
const constants_1 = require("../constants");
|
|
16
|
-
class LiveVideo extends _1.Video {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.delay = 0;
|
|
20
|
-
this._timeoutMs = 0;
|
|
21
|
-
this._chatQueue = [];
|
|
22
|
-
}
|
|
23
|
-
load(data) {
|
|
24
|
-
super.load(data);
|
|
25
|
-
this._chatContinuation =
|
|
26
|
-
data[3].response.contents.twoColumnWatchNextResults.conversationBar.liveChatRenderer.continuations[0].reloadContinuationData.continuation;
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
playChat(delay = 0) {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
this.delay = delay;
|
|
32
|
-
const response = yield common_1.http.post(constants_1.LIVE_CHAT_END_POINT, {
|
|
33
|
-
data: { continuation: this._chatContinuation },
|
|
34
|
-
});
|
|
35
|
-
this.parseChat(response.data);
|
|
36
|
-
const timedContinuation = response.data.continuationContents.liveChatContinuation.continuations[0]
|
|
37
|
-
.timedContinuationData;
|
|
38
|
-
this._timeoutMs = timedContinuation.timeoutMs;
|
|
39
|
-
this._chatContinuation = timedContinuation.continuation;
|
|
40
|
-
this._chatRequestPoolingTimeout = setTimeout(() => this.playChat(this.delay), this._timeoutMs);
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
parseChat(data) {
|
|
44
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const chats = data.continuationContents.liveChatContinuation.actions.flatMap((a) => { var _a; return ((_a = a.addChatItemAction) === null || _a === void 0 ? void 0 : _a.item.liveChatTextMessageRenderer) || []; });
|
|
46
|
-
for (const rawChatData of chats) {
|
|
47
|
-
const chat = new _1.Chat().load(rawChatData);
|
|
48
|
-
if (this._chatQueue.find((c) => c.id === chat.id))
|
|
49
|
-
continue;
|
|
50
|
-
this._chatQueue.push(chat);
|
|
51
|
-
setTimeout(() => {
|
|
52
|
-
this.emit("chat", chat);
|
|
53
|
-
}, chat.timestamp / 1000 - (new Date().getTime() - this.delay));
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
common_1.applyMixins(LiveVideo, [events_1.EventEmitter]);
|
|
59
|
-
exports.default = LiveVideo;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { YoutubeRawData } from "../common";
|
|
2
|
-
import Channel from "./Channel";
|
|
3
|
-
import VideoCompact from "./VideoCompact";
|
|
4
|
-
/** @hidden */
|
|
5
|
-
interface PlaylistAttributes {
|
|
6
|
-
id: string;
|
|
7
|
-
title: string;
|
|
8
|
-
videoCount: number;
|
|
9
|
-
viewCount: number;
|
|
10
|
-
lastUpdatedAt: string;
|
|
11
|
-
channel?: Channel;
|
|
12
|
-
videos: VideoCompact[];
|
|
13
|
-
}
|
|
14
|
-
/** Represents a Playlist, usually returned from `client.getPlaylist()` */
|
|
15
|
-
export default class Playlist implements PlaylistAttributes {
|
|
16
|
-
/** The playlist's ID */
|
|
17
|
-
id: string;
|
|
18
|
-
/** The title of this playlist */
|
|
19
|
-
title: string;
|
|
20
|
-
/** How many videos in this playlist */
|
|
21
|
-
videoCount: number;
|
|
22
|
-
/** How many viewers does this playlist have */
|
|
23
|
-
viewCount: number;
|
|
24
|
-
/** Last time this playlist is updated */
|
|
25
|
-
lastUpdatedAt: string;
|
|
26
|
-
/** The channel that made this playlist */
|
|
27
|
-
channel?: Channel;
|
|
28
|
-
/** Videos in the playlist */
|
|
29
|
-
videos: VideoCompact[];
|
|
30
|
-
private _continuation;
|
|
31
|
-
/** @hidden */
|
|
32
|
-
constructor(playlist?: Partial<Playlist>);
|
|
33
|
-
/**
|
|
34
|
-
* Load instance attributes from youtube raw data
|
|
35
|
-
*
|
|
36
|
-
* @param youtubeRawData raw object from youtubei
|
|
37
|
-
* @hidden
|
|
38
|
-
*/
|
|
39
|
-
load(youtubeRawData: YoutubeRawData): Playlist;
|
|
40
|
-
/**
|
|
41
|
-
* Load next 100 videos of the playlist
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```js
|
|
45
|
-
* const playlist = await youtube.getPlaylist(PLAYLIST_ID);
|
|
46
|
-
* console.log(playlist.videos) // first 100 videos
|
|
47
|
-
*
|
|
48
|
-
* let newVideos = await playlist.next();
|
|
49
|
-
* console.log(newVideos) // 100 loaded videos
|
|
50
|
-
* console.log(playlist.videos) // first 200 videos
|
|
51
|
-
*
|
|
52
|
-
* await playlist.next(0); // load the rest of the videos in the playlist
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* @param count How many times to load the next videos. Set 0 to load all videos (might take a while on a large playlist!)
|
|
56
|
-
*/
|
|
57
|
-
next(count?: number): Promise<VideoCompact[]>;
|
|
58
|
-
/**
|
|
59
|
-
* Get compact videos
|
|
60
|
-
*
|
|
61
|
-
* @param playlistContents raw object from youtubei
|
|
62
|
-
*/
|
|
63
|
-
private static getVideos;
|
|
64
|
-
private static getSideBarInfo;
|
|
65
|
-
}
|
|
66
|
-
export {};
|
package/dist/classes/Playlist.js
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const _1 = require(".");
|
|
16
|
-
const common_1 = require("../common");
|
|
17
|
-
const constants_1 = require("../constants");
|
|
18
|
-
const Channel_1 = __importDefault(require("./Channel"));
|
|
19
|
-
const VideoCompact_1 = __importDefault(require("./VideoCompact"));
|
|
20
|
-
/** Represents a Playlist, usually returned from `client.getPlaylist()` */
|
|
21
|
-
class Playlist {
|
|
22
|
-
/** @hidden */
|
|
23
|
-
constructor(playlist = {}) {
|
|
24
|
-
Object.assign(this, playlist);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Load instance attributes from youtube raw data
|
|
28
|
-
*
|
|
29
|
-
* @param youtubeRawData raw object from youtubei
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
load(youtubeRawData) {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
const sidebarRenderer = youtubeRawData.sidebar.playlistSidebarRenderer.items;
|
|
35
|
-
const primaryRenderer = sidebarRenderer[0].playlistSidebarPrimaryInfoRenderer;
|
|
36
|
-
// Basic information
|
|
37
|
-
this.id = primaryRenderer.title.runs[0].navigationEndpoint.watchEndpoint.playlistId;
|
|
38
|
-
this.title = primaryRenderer.title.runs[0].text;
|
|
39
|
-
const { stats } = primaryRenderer;
|
|
40
|
-
if (primaryRenderer.stats.length === 3) {
|
|
41
|
-
this.videoCount = Playlist.getSideBarInfo(stats[0], true);
|
|
42
|
-
this.viewCount = Playlist.getSideBarInfo(stats[1], true);
|
|
43
|
-
this.lastUpdatedAt = Playlist.getSideBarInfo(stats[2], false);
|
|
44
|
-
}
|
|
45
|
-
else if (stats.length === 2) {
|
|
46
|
-
this.videoCount = Playlist.getSideBarInfo(stats[0], true);
|
|
47
|
-
this.lastUpdatedAt = Playlist.getSideBarInfo(stats[1], false);
|
|
48
|
-
}
|
|
49
|
-
// Videos
|
|
50
|
-
const playlistContents = youtubeRawData.contents.twoColumnBrowseResultsRenderer.tabs[0].tabRenderer.content
|
|
51
|
-
.sectionListRenderer.contents[0].itemSectionRenderer.contents[0]
|
|
52
|
-
.playlistVideoListRenderer.contents;
|
|
53
|
-
const videos = Playlist.getVideos(playlistContents);
|
|
54
|
-
// Video Continuation Token
|
|
55
|
-
this._continuation = (_a = playlistContents[100]) === null || _a === void 0 ? void 0 : _a.continuationItemRenderer.continuationEndpoint.continuationCommand.token;
|
|
56
|
-
this.videos = videos;
|
|
57
|
-
// Channel
|
|
58
|
-
const videoOwner = ((_b = sidebarRenderer[1]) === null || _b === void 0 ? void 0 : _b.playlistSidebarSecondaryInfoRenderer.videoOwner) || undefined;
|
|
59
|
-
if (videoOwner) {
|
|
60
|
-
const { title, thumbnail } = videoOwner.videoOwnerRenderer;
|
|
61
|
-
this.channel = new Channel_1.default({
|
|
62
|
-
id: title.runs[0].navigationEndpoint.browseEndpoint.browseId,
|
|
63
|
-
name: title.runs[0].text,
|
|
64
|
-
thumbnails: new _1.Thumbnails().load(thumbnail.thumbnails),
|
|
65
|
-
url: "https://www.youtube.com" +
|
|
66
|
-
title.runs[0].navigationEndpoint.commandMetadata.webCommandMetadata.url,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
return this;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Load next 100 videos of the playlist
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
* ```js
|
|
76
|
-
* const playlist = await youtube.getPlaylist(PLAYLIST_ID);
|
|
77
|
-
* console.log(playlist.videos) // first 100 videos
|
|
78
|
-
*
|
|
79
|
-
* let newVideos = await playlist.next();
|
|
80
|
-
* console.log(newVideos) // 100 loaded videos
|
|
81
|
-
* console.log(playlist.videos) // first 200 videos
|
|
82
|
-
*
|
|
83
|
-
* await playlist.next(0); // load the rest of the videos in the playlist
|
|
84
|
-
* ```
|
|
85
|
-
*
|
|
86
|
-
* @param count How many times to load the next videos. Set 0 to load all videos (might take a while on a large playlist!)
|
|
87
|
-
*/
|
|
88
|
-
next(count = 1) {
|
|
89
|
-
var _a;
|
|
90
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
const newVideos = [];
|
|
92
|
-
for (let i = 0; i < count || count == 0; i++) {
|
|
93
|
-
if (!this._continuation)
|
|
94
|
-
break;
|
|
95
|
-
const response = yield common_1.http.post(`${constants_1.I_END_POINT}/browse`, {
|
|
96
|
-
data: { continuation: this._continuation },
|
|
97
|
-
});
|
|
98
|
-
const playlistContents = response.data.onResponseReceivedActions[0].appendContinuationItemsAction
|
|
99
|
-
.continuationItems;
|
|
100
|
-
newVideos.push(...Playlist.getVideos(playlistContents));
|
|
101
|
-
this._continuation = (_a = playlistContents[100]) === null || _a === void 0 ? void 0 : _a.continuationItemRenderer.continuationEndpoint.continuationCommand.token;
|
|
102
|
-
}
|
|
103
|
-
this.videos.push(...newVideos);
|
|
104
|
-
return newVideos;
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Get compact videos
|
|
109
|
-
*
|
|
110
|
-
* @param playlistContents raw object from youtubei
|
|
111
|
-
*/
|
|
112
|
-
static getVideos(playlistContents) {
|
|
113
|
-
const videosRenderer = playlistContents.map((c) => c.playlistVideoRenderer);
|
|
114
|
-
const videos = [];
|
|
115
|
-
for (const videoRenderer of videosRenderer) {
|
|
116
|
-
if (!videoRenderer)
|
|
117
|
-
continue;
|
|
118
|
-
videos.push(new VideoCompact_1.default().load(videoRenderer));
|
|
119
|
-
}
|
|
120
|
-
return videos;
|
|
121
|
-
}
|
|
122
|
-
static getSideBarInfo(stats, parseInt) {
|
|
123
|
-
let data;
|
|
124
|
-
if ("runs" in stats)
|
|
125
|
-
data = stats.runs.map((r) => r.text).join("");
|
|
126
|
-
else
|
|
127
|
-
data = stats.simpleText.replace(/[^0-9]/g, "");
|
|
128
|
-
if (parseInt)
|
|
129
|
-
data = +data.replace(/[^0-9]/g, "");
|
|
130
|
-
return data;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
exports.default = Playlist;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Thumbnails } from ".";
|
|
2
|
-
import { YoutubeRawData } from "../common";
|
|
3
|
-
import Base from "./Base";
|
|
4
|
-
import Channel from "./Channel";
|
|
5
|
-
/** @hidden */
|
|
6
|
-
interface PlaylistCompactAttributes {
|
|
7
|
-
id: string;
|
|
8
|
-
title: string;
|
|
9
|
-
thumbnails: Thumbnails;
|
|
10
|
-
channel?: Channel;
|
|
11
|
-
videoCount: number;
|
|
12
|
-
}
|
|
13
|
-
/** Represents a Compact Playlist (e.g. from search result, upNext / related of a video) */
|
|
14
|
-
export default class PlaylistCompact extends Base implements PlaylistCompactAttributes {
|
|
15
|
-
/** The playlist's ID */
|
|
16
|
-
id: string;
|
|
17
|
-
/** The playlist's title */
|
|
18
|
-
title: string;
|
|
19
|
-
/** Thumbnails of the playlist with different sizes */
|
|
20
|
-
thumbnails: Thumbnails;
|
|
21
|
-
/** The channel that made this playlist */
|
|
22
|
-
channel?: Channel;
|
|
23
|
-
/** How many videos in this playlist */
|
|
24
|
-
videoCount: number;
|
|
25
|
-
/** @hidden */
|
|
26
|
-
constructor(playlist?: Partial<PlaylistCompactAttributes>);
|
|
27
|
-
/**
|
|
28
|
-
* Load instance attributes from youtube raw data
|
|
29
|
-
*
|
|
30
|
-
* @param youtubeRawData raw object from youtubei
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
load(youtubeRawData: YoutubeRawData): PlaylistCompact;
|
|
34
|
-
}
|
|
35
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const _1 = require(".");
|
|
7
|
-
const Base_1 = __importDefault(require("./Base"));
|
|
8
|
-
const Channel_1 = __importDefault(require("./Channel"));
|
|
9
|
-
/** Represents a Compact Playlist (e.g. from search result, upNext / related of a video) */
|
|
10
|
-
class PlaylistCompact extends Base_1.default {
|
|
11
|
-
/** @hidden */
|
|
12
|
-
constructor(playlist = {}) {
|
|
13
|
-
super();
|
|
14
|
-
Object.assign(this, playlist);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Load instance attributes from youtube raw data
|
|
18
|
-
*
|
|
19
|
-
* @param youtubeRawData raw object from youtubei
|
|
20
|
-
* @hidden
|
|
21
|
-
*/
|
|
22
|
-
load(youtubeRawData) {
|
|
23
|
-
var _a;
|
|
24
|
-
const { playlistId, title, thumbnail, shortBylineText, videoCount, videoCountShortText, } = youtubeRawData;
|
|
25
|
-
this.id = playlistId;
|
|
26
|
-
this.title = title.simpleText || title.runs[0].text;
|
|
27
|
-
this.videoCount =
|
|
28
|
-
+((_a = (videoCount !== null && videoCount !== void 0 ? videoCount : videoCountShortText.simpleText)) === null || _a === void 0 ? void 0 : _a.replace(/[^0-9]/g, "")) || 0;
|
|
29
|
-
// Thumbnail
|
|
30
|
-
let { thumbnails } = youtubeRawData;
|
|
31
|
-
if (!thumbnails)
|
|
32
|
-
thumbnails = thumbnail.thumbnails;
|
|
33
|
-
else
|
|
34
|
-
thumbnails = thumbnails[0].thumbnails;
|
|
35
|
-
this.thumbnails = new _1.Thumbnails().load(thumbnails);
|
|
36
|
-
// Channel
|
|
37
|
-
if (shortBylineText && shortBylineText.simpleText !== "YouTube") {
|
|
38
|
-
this.channel = new Channel_1.default({
|
|
39
|
-
id: shortBylineText.runs[0].navigationEndpoint.browseEndpoint.browseId,
|
|
40
|
-
name: shortBylineText.runs[0].text,
|
|
41
|
-
url: `https://www.youtube.com${shortBylineText.runs[0].navigationEndpoint.commandMetadata.webCommandMetadata.url}`,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
return this;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.default = PlaylistCompact;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Channel, PlaylistCompact, VideoCompact, SearchOptions } from ".";
|
|
2
|
-
export declare type SearchResultType<T> = T extends {
|
|
3
|
-
type: "video";
|
|
4
|
-
} ? VideoCompact : T extends {
|
|
5
|
-
type: "channel";
|
|
6
|
-
} ? Channel : T extends {
|
|
7
|
-
type: "playlist";
|
|
8
|
-
} ? PlaylistCompact : VideoCompact | Channel | PlaylistCompact;
|
|
9
|
-
/**
|
|
10
|
-
* Represents search result, usually returned from `client.search();`
|
|
11
|
-
*
|
|
12
|
-
* @noInheritDoc
|
|
13
|
-
*/
|
|
14
|
-
export default class SearchResult<T> extends Array<SearchResultType<T>> {
|
|
15
|
-
private _continuation;
|
|
16
|
-
/** @hidden */
|
|
17
|
-
constructor();
|
|
18
|
-
/**
|
|
19
|
-
* Initialize data from search
|
|
20
|
-
*
|
|
21
|
-
* @param query Search query
|
|
22
|
-
* @param options Search Options
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
init(query: string, options: SearchOptions): Promise<SearchResult<T>>;
|
|
26
|
-
/**
|
|
27
|
-
* Load next search data. Youtube returns inconsistent amount of search result, it usually varies from 18 to 20
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```js
|
|
31
|
-
* const videos = await youtube.search("keyword", { type: "video" });
|
|
32
|
-
* console.log(videos) // first 18-20 videos from the search result
|
|
33
|
-
*
|
|
34
|
-
* let newVideos = await videos.next();
|
|
35
|
-
* console.log(newVideos) // 18-20 loaded videos
|
|
36
|
-
* console.log(videos) // 36-40 first videos from the search result
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @param count How many times to load the next data
|
|
40
|
-
*/
|
|
41
|
-
next(count?: number): Promise<Array<SearchResultType<T>>>;
|
|
42
|
-
/** Load videos data from youtube */
|
|
43
|
-
private loadSearchResult;
|
|
44
|
-
/**
|
|
45
|
-
* Get type query value
|
|
46
|
-
*
|
|
47
|
-
* @param type Search type
|
|
48
|
-
* @hidden
|
|
49
|
-
*/
|
|
50
|
-
static getSearchTypeParam(type: "video" | "playlist" | "channel" | "all"): string;
|
|
51
|
-
}
|