tempguy-scarletsole.web.val.run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import { blob } from "https://esm.town/v/std/blob";
import { doodstream, streamium, streamtape } from "https://esm.town/v/tempguy/redMonkey";
import { Hono } from "npm:hono";
interface Context {
url: string;
}
const app = new Hono();
app.get("/dood/:dood", async (c) => {
const { dood } = c.req.param();
const ctx = { url: "https://d000d.com/e/" + dood };
return c.json(await doodstream(ctx));
});
app.get("/tape/:tape", async (c) => {
const { tape } = c.req.param();
const ctx = { url: "https://streamtape.com/e/" + tape };
return c.json(await streamtape(ctx));
});
app.get("/strm/:strm", async (c) => {
const { strm } = c.req.param();
const ctx = { url: decodeURIComponent(strm) };
return c.json(await streamium(ctx));
});
app.get("/refresh", async (c) => {
const data = {
sitekey: "0x4AAAAAAALn0BYsCrtFUbm_",
invisible: true,
url: "https://d000d.com/e/9x3w3pu0xemy",
};
const req = await fetch("http://turnsolver.pythonanywhere.com/solve", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(data),
});
const tokenReq = await req.json();
const token = tokenReq.token;
const ver = await fetch(
`https://cool-proxy.koyeb.app/hdiuhmalkmc9d0ck7UCFVGBJHN?destination=`
+ encodeURIComponent(`https://d0000d.com/dood?op=validate&gc_response=${token}`),
);
return c.json({ worked: true, token: token });
});
app.get("/stats", async (c) => {
let data = await blob.getJSON("turnstileCron");
return c.json(
{
worked: true,
crons: {
latestRun: new Date(data.ptime),
upcommingRun: new Date(data.ntime),
},
limits: {
s: Number(await blob.get("streamtapeLimit")),
},
},
);
});
app.get("/reset", async (c) => {
await blob.set("streamtapeLimit", "0");
return c.json({ worked: true });
});
export default app.fetch;
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
August 3, 2024