Compare commits

...

3 Commits

Author SHA1 Message Date
github-actions[bot]
891d889408 chore(main): release 5.0.3 (#395)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-03 19:47:01 -03:00
LuanRT
d4adb9eb6b chore(PlayerEndpoint.ts): add back attestationRequest field
This was accidentally removed in a recent PR. It tells InnerTube to omit the botguard program data.
2023-05-03 19:31:59 -03:00
LuanRT
3b0498b68b fix(Video): typo causing node parsing to fail 2023-05-02 03:21:02 -03:00
6 changed files with 18 additions and 5 deletions

View File

@@ -1,5 +1,12 @@
# 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)

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "youtubei.js",
"version": "5.0.2",
"version": "5.0.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "youtubei.js",
"version": "5.0.2",
"version": "5.0.3",
"funding": [
"https://github.com/sponsors/LuanRT"
],

View File

@@ -1,6 +1,6 @@
{
"name": "youtubei.js",
"version": "5.0.2",
"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",

View File

@@ -28,6 +28,9 @@ export function build(opts: PlayerEndpointOptions): IPlayerRequest {
}
}
},
attestationRequest: {
omitBotguardData: true
},
racyCheckOk: true,
contentCheckOk: true,
videoId: opts.video_id,

View File

@@ -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];
}
}
}

View File

@@ -20,6 +20,9 @@ export interface IPlayerRequest {
lactMilliseconds: string;
}
},
attestationRequest: {
omitBotguardData: boolean;
},
videoId: string;
racyCheckOk: boolean;
contentCheckOk: boolean;