mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-14 01:52:11 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
891d889408 | ||
|
|
d4adb9eb6b | ||
|
|
3b0498b68b | ||
|
|
154a5d2868 | ||
|
|
7c0abfccd7 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,5 +1,19 @@
|
||||
# Changelog
|
||||
|
||||
## [5.0.3](https://github.com/LuanRT/YouTube.js/compare/v5.0.2...v5.0.3) (2023-05-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Video:** typo causing node parsing to fail ([3b0498b](https://github.com/LuanRT/YouTube.js/commit/3b0498b68b5378e63283e792bd45571c0b919e0b))
|
||||
|
||||
## [5.0.2](https://github.com/LuanRT/YouTube.js/compare/v5.0.1...v5.0.2) (2023-04-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **VideoInfo:** Use microformat view_count when videoDetails view_count is NaN ([#393](https://github.com/LuanRT/YouTube.js/issues/393)) ([7c0abfc](https://github.com/LuanRT/YouTube.js/commit/7c0abfccd78a6c291d898f898d73a4f16170e2a9))
|
||||
|
||||
## [5.0.1](https://github.com/LuanRT/YouTube.js/compare/v5.0.0...v5.0.1) (2023-04-30)
|
||||
|
||||
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "youtubei.js",
|
||||
"version": "5.0.1",
|
||||
"version": "5.0.3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "youtubei.js",
|
||||
"version": "5.0.1",
|
||||
"version": "5.0.3",
|
||||
"funding": [
|
||||
"https://github.com/sponsors/LuanRT"
|
||||
],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "youtubei.js",
|
||||
"version": "5.0.1",
|
||||
"version": "5.0.3",
|
||||
"description": "A wrapper around YouTube's private API. Supports YouTube, YouTube Music, YouTube Kids and YouTube Studio (WIP).",
|
||||
"type": "module",
|
||||
"types": "./dist/src/platform/lib.d.ts",
|
||||
|
||||
@@ -28,6 +28,9 @@ export function build(opts: PlayerEndpointOptions): IPlayerRequest {
|
||||
}
|
||||
}
|
||||
},
|
||||
attestationRequest: {
|
||||
omitBotguardData: true
|
||||
},
|
||||
racyCheckOk: true,
|
||||
contentCheckOk: true,
|
||||
videoId: opts.video_id,
|
||||
|
||||
@@ -53,7 +53,7 @@ export default class Video extends YTNode {
|
||||
this.description_snippet = new Text(data.descriptionSnippet);
|
||||
}
|
||||
|
||||
if (Reflect.has(data, 'detaildMetadataSnippets')) {
|
||||
if (Reflect.has(data, 'detailedMetadataSnippets')) {
|
||||
this.snippets = data.detailedMetadataSnippets.map((snippet: RawNode) => ({
|
||||
text: new Text(snippet.snippetText),
|
||||
hover_text: new Text(snippet.snippetHoverText)
|
||||
@@ -127,4 +127,4 @@ export default class Video extends YTNode {
|
||||
get best_thumbnail(): Thumbnail | undefined {
|
||||
return this.thumbnails[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,8 @@ class VideoInfo extends MediaInfo {
|
||||
is_family_safe: info.microformat?.is_family_safe,
|
||||
category: info.microformat?.is(PlayerMicroformat) ? info.microformat?.category : null,
|
||||
has_ypc_metadata: info.microformat?.is(PlayerMicroformat) ? info.microformat?.has_ypc_metadata : null,
|
||||
start_timestamp: info.microformat?.is(PlayerMicroformat) ? info.microformat.start_timestamp : null
|
||||
start_timestamp: info.microformat?.is(PlayerMicroformat) ? info.microformat.start_timestamp : null,
|
||||
view_count: info.microformat?.is(PlayerMicroformat) && isNaN(info.video_details?.view_count as number) ? info.microformat.view_count : info.video_details?.view_count
|
||||
},
|
||||
like_count: undefined as number | undefined,
|
||||
is_liked: undefined as boolean | undefined,
|
||||
|
||||
@@ -20,6 +20,9 @@ export interface IPlayerRequest {
|
||||
lactMilliseconds: string;
|
||||
}
|
||||
},
|
||||
attestationRequest: {
|
||||
omitBotguardData: boolean;
|
||||
},
|
||||
videoId: string;
|
||||
racyCheckOk: boolean;
|
||||
contentCheckOk: boolean;
|
||||
|
||||
Reference in New Issue
Block a user