mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 04:17:47 +01:00
Update src/libpoketube/libpoketube-dislikes.js
This commit is contained in:
parent
ed1b646a40
commit
cb9342a799
1 changed files with 3 additions and 2 deletions
|
@ -35,13 +35,13 @@ class PokeTubeDislikesAPIManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves engagement data for the YouTube video.
|
* Retrieves engagement data for the YouTube video.
|
||||||
* @returns {Promise<object|null>} A Promise that resolves with the engagement data, or null if an error occurs.
|
* @returns {Promise<object|null>} A Promise that resolves with the engagement data, or null if an error occurs.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _getEngagementData() {
|
async _getEngagementData() {
|
||||||
const fallbackUrl = `https://returnyoutubedislikeapi.com/votes?videoId=${this.videoId}&cachefixer=${btoa(Date.now())}`;
|
const fallbackUrl = `https://prod-poketube.testing.poketube.fun/api?v=${this.videoId}`;
|
||||||
|
|
||||||
const { fetch } = await import("undici");
|
const { fetch } = await import("undici");
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ class PokeTubeDislikesAPIManager {
|
||||||
return engagement;
|
return engagement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves data about the YouTube video and its engagement.
|
* Retrieves data about the YouTube video and its engagement.
|
||||||
* @returns {Promise<object>} A Promise that resolves with an object containing video and engagement data.
|
* @returns {Promise<object>} A Promise that resolves with an object containing video and engagement data.
|
||||||
|
|
Loading…
Reference in a new issue