mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-13 09:32:12 +00:00
fix(Innertube)!: Remove getTrending as YouTube removed the trending feed (#1114)
This commit is contained in:
@@ -364,12 +364,6 @@ export default class Innertube {
|
||||
return new History(this.actions, response);
|
||||
}
|
||||
|
||||
async getTrending(): Promise<TabbedFeed<IBrowseResponse>> {
|
||||
const browse_endpoint = new NavigationEndpoint({ browseEndpoint: { browseId: 'FEtrending' } });
|
||||
const response = await browse_endpoint.call(this.#session.actions);
|
||||
return new TabbedFeed(this.actions, response);
|
||||
}
|
||||
|
||||
async getCourses(): Promise<Feed<IBrowseResponse>> {
|
||||
const browse_endpoint = new NavigationEndpoint({ browseEndpoint: { browseId: 'FEcourses_destination' } });
|
||||
const response = await browse_endpoint.call(this.#session.actions, { parse: true });
|
||||
|
||||
@@ -156,14 +156,6 @@ describe('YouTube.js Tests', () => {
|
||||
expect(guide.contents?.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
test('Innertube#getTrending', async () => {
|
||||
const trending = await innertube.getTrending();
|
||||
expect(trending).toBeDefined();
|
||||
expect(trending.page.contents).toBeDefined();
|
||||
expect(trending.page.contents_memo).toBeDefined();
|
||||
expect(trending.videos.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
test('Innertube#getCourses', async () => {
|
||||
const courses = await innertube.getCourses();
|
||||
expect(courses).toBeDefined();
|
||||
|
||||
Reference in New Issue
Block a user