youtubei 1.3.4 → 1.3.5

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.
@@ -78,8 +78,10 @@ class Client {
78
78
  const response = yield this.http.get(`${constants_1.WATCH_END_POINT}`, {
79
79
  params: { v: videoId, pbj: "1" },
80
80
  });
81
- if (!response.data[3].response.contents)
81
+ if (!response.data[3].response.contents ||
82
+ response.data[2].playerResponse.playabilityStatus.status === "ERROR") {
82
83
  return undefined;
84
+ }
83
85
  return (!response.data[2].playerResponse.playabilityStatus.liveStreamability
84
86
  ? new Video_1.Video({ client: this }).load(response.data)
85
87
  : new LiveVideo_1.LiveVideo({ client: this }).load(response.data));
@@ -143,8 +143,10 @@ var Client = /** @class */ (function () {
143
143
  })];
144
144
  case 1:
145
145
  response = _a.sent();
146
- if (!response.data[3].response.contents)
146
+ if (!response.data[3].response.contents ||
147
+ response.data[2].playerResponse.playabilityStatus.status === "ERROR") {
147
148
  return [2 /*return*/, undefined];
149
+ }
148
150
  return [2 /*return*/, (!response.data[2].playerResponse.playabilityStatus.liveStreamability
149
151
  ? new Video({ client: this }).load(response.data)
150
152
  : new LiveVideo({ client: this }).load(response.data))];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "youtubei",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Simple package to get information from youtube such as videos, playlists, channels, video information & comments, related videos, up next video, and more!",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",