|
1 |
| -import { ClientType, Endpoints, Innertube, Misc, Parser, UniversalCache, Utils, YT } from 'youtubei.js' |
| 1 | +import { ClientType, Innertube, Misc, Parser, UniversalCache, Utils, YT, YTNodes } from 'youtubei.js' |
2 | 2 | import Autolinker from 'autolinker'
|
3 | 3 | import { SEARCH_CHAR_LIMIT } from '../../../constants'
|
4 | 4 |
|
@@ -379,12 +379,12 @@ export async function getLocalChannelVideos(id) {
|
379 | 379 | const innertube = await createInnertube()
|
380 | 380 |
|
381 | 381 | try {
|
382 |
| - const response = await innertube.actions.execute(Endpoints.BrowseEndpoint.PATH, Endpoints.BrowseEndpoint.build({ |
383 |
| - browse_id: id, |
| 382 | + const response = await innertube.actions.execute('/browse', { |
| 383 | + browseId: id, |
384 | 384 | params: 'EgZ2aWRlb3PyBgQKAjoA'
|
385 | 385 | // protobuf for the videos tab (this is the one that YouTube uses,
|
386 | 386 | // it has some empty fields in the protobuf but it doesn't work if you remove them)
|
387 |
| - })) |
| 387 | + }) |
388 | 388 |
|
389 | 389 | const videosTab = new YT.Channel(null, response)
|
390 | 390 | const { id: channelId = id, name, thumbnailUrl } = parseLocalChannelHeader(videosTab, true)
|
@@ -436,12 +436,12 @@ export async function getLocalChannelLiveStreams(id) {
|
436 | 436 | const innertube = await createInnertube()
|
437 | 437 |
|
438 | 438 | try {
|
439 |
| - const response = await innertube.actions.execute(Endpoints.BrowseEndpoint.PATH, Endpoints.BrowseEndpoint.build({ |
440 |
| - browse_id: id, |
| 439 | + const response = await innertube.actions.execute('/browse', { |
| 440 | + browseId: id, |
441 | 441 | params: 'EgdzdHJlYW1z8gYECgJ6AA%3D%3D'
|
442 | 442 | // protobuf for the live tab (this is the one that YouTube uses,
|
443 | 443 | // it has some empty fields in the protobuf but it doesn't work if you remove them)
|
444 |
| - })) |
| 444 | + }) |
445 | 445 |
|
446 | 446 | let liveStreamsTab = new YT.Channel(innertube.actions, response)
|
447 | 447 | const { id: channelId = id, name, thumbnailUrl } = parseLocalChannelHeader(liveStreamsTab, true)
|
@@ -484,12 +484,12 @@ export async function getLocalChannelCommunity(id) {
|
484 | 484 | const innertube = await createInnertube()
|
485 | 485 |
|
486 | 486 | try {
|
487 |
| - const response = await innertube.actions.execute(Endpoints.BrowseEndpoint.PATH, Endpoints.BrowseEndpoint.build({ |
488 |
| - browse_id: id, |
| 487 | + const response = await innertube.actions.execute('/browse', { |
| 488 | + browseId: id, |
489 | 489 | params: 'Egljb21tdW5pdHnyBgQKAkoA'
|
490 | 490 | // protobuf for the community tab (this is the one that YouTube uses,
|
491 | 491 | // it has some empty fields in the protobuf but it doesn't work if you remove them)
|
492 |
| - })) |
| 492 | + }) |
493 | 493 |
|
494 | 494 | const communityTab = new YT.Channel(null, response)
|
495 | 495 |
|
|
0 commit comments