mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-25 21:58:54 +01:00
remove unneeded requires
This commit is contained in:
parent
58f51bbfd7
commit
bb913997b8
1 changed files with 3 additions and 4 deletions
|
@ -10,7 +10,6 @@ const { toJson } = require("xml2json");
|
||||||
const { curly } = require("node-libcurl");
|
const { curly } = require("node-libcurl");
|
||||||
const getdislikes = require("../libpoketube/libpoketube-dislikes.js");
|
const getdislikes = require("../libpoketube/libpoketube-dislikes.js");
|
||||||
const getColors = require("get-image-colors");
|
const getColors = require("get-image-colors");
|
||||||
const wiki = require("wikipedia");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class representing PokeTube's core functionality.
|
* Class representing PokeTube's core functionality.
|
||||||
|
@ -79,8 +78,8 @@ class PokeTubeCore {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const [invComments, videoInfo, videoData] = await Promise.all([
|
const [invComments, videoInfo, videoData] = await Promise.all([
|
||||||
fetch(`${this.config.invapi_alt}/comments/${v}?hl=${contentlang}®ion=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text()),
|
fetch(`${this.config.invapi}/comments/${v}?hl=${contentlang}®ion=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text()),
|
||||||
fetch(`${this.config.invapi_alt}/videos/${v}?hl=${contentlang}®ion=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text()),
|
fetch(`${this.config.invapi}/videos/${v}?hl=${contentlang}®ion=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text()),
|
||||||
curly
|
curly
|
||||||
.get(`${this.config.tubeApi}video?v=${v}`, {
|
.get(`${this.config.tubeApi}video?v=${v}`, {
|
||||||
httpHeader: Object.entries(headers).map(([k, v]) => `${k}: ${v}`),
|
httpHeader: Object.entries(headers).map(([k, v]) => `${k}: ${v}`),
|
||||||
|
@ -97,7 +96,7 @@ class PokeTubeCore {
|
||||||
const { json, video } = videoData;
|
const { json, video } = videoData;
|
||||||
|
|
||||||
const channel_uploads = await fetch(
|
const channel_uploads = await fetch(
|
||||||
`${this.config.invapi_alt}/channels/${vid.authorId}?hl=${contentlang}®ion=${contentregion}`
|
`${this.config.invapi}/channels/${vid.authorId}?hl=${contentlang}®ion=${contentregion}`
|
||||||
);
|
);
|
||||||
const p = this.getJson(await channel_uploads.text());
|
const p = this.getJson(await channel_uploads.text());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue