mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 10:38:25 +01:00
ip info
This commit is contained in:
parent
68ff7be74a
commit
d21c877e98
1 changed files with 6 additions and 1 deletions
|
@ -42,7 +42,7 @@ var sha512_256 = require("js-sha512").sha512_256;
|
||||||
var sha512_224 = require("js-sha512").sha512_224;
|
var sha512_224 = require("js-sha512").sha512_224;
|
||||||
|
|
||||||
const musicInfo = require("music-info");
|
const musicInfo = require("music-info");
|
||||||
|
|
||||||
var app = express();
|
var app = express();
|
||||||
app.engine("html", require("ejs").renderFile);
|
app.engine("html", require("ejs").renderFile);
|
||||||
app.use(express.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded
|
app.use(express.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded
|
||||||
|
@ -135,6 +135,10 @@ app.get("/watch", async function (req, res) {
|
||||||
|
|
||||||
const video = await fetch(config.tubeApi + `video?v=${v}`);
|
const video = await fetch(config.tubeApi + `video?v=${v}`);
|
||||||
|
|
||||||
|
const info = await fetch("http://ip-api.com/json/");
|
||||||
|
const n = await info.text();
|
||||||
|
const ip = JSON.parse(n);
|
||||||
|
|
||||||
var fetching = await fetcher(v);
|
var fetching = await fetcher(v);
|
||||||
|
|
||||||
const json = fetching.video.Player;
|
const json = fetching.video.Player;
|
||||||
|
@ -185,6 +189,7 @@ app.get("/watch", async function (req, res) {
|
||||||
tj: tj,
|
tj: tj,
|
||||||
r: r,
|
r: r,
|
||||||
qua: q,
|
qua: q,
|
||||||
|
ip:ip,
|
||||||
f: f,
|
f: f,
|
||||||
t: config.t_url,
|
t: config.t_url,
|
||||||
optout: t,
|
optout: t,
|
||||||
|
|
Loading…
Reference in a new issue