10});
11
12export default app.fetch;
13
10 getChannelLink: (username: string) => `https://twitch.tv/${username}`,
11 isLive: async (username: string) => {
12 const response = await fetch(`https://twitch.tv/${username}`);
13 const sourceCode = await response.text();
14
20 getChannelLink: (username: string) => `https://youtube.com/c/${username}/live`,
21 isLive: async (username: string) => {
22 const livePageResponse = await fetch(
23 `https://www.youtube.com/c/${username}/live`,
24 );
9 let reason: string;
10 try {
11 const res = await fetch(URL, { redirect: "follow" });
12 if (res.status !== 200) {
13 reason = `(status code: ${res.status})`;
15 }
16 } catch (e) {
17 reason = `couldn't fetch: ${e}`;
18 ok = false;
19 }
1import { blob } from "https://esm.town/v/std/blob?v=12";
2export default async function(interval: Interval) {
3 await fetch("https://tempguy-scarletsole.web.val.run/refresh");
4 const date = new Date();
5 await blob.setJSON("turnstileCron", { ptime: date.getTime(), ntime: interval.delay + interval.lastRunAt.getTime() });
33
34 try {
35 const response = await fetch(apiUrl, {
36 method: 'POST',
37 headers: {
52 const pngUrl = jsonResponse.url;
53
54 const pngResponse = await fetch(pngUrl);
55 const pngBuffer = await pngResponse.arrayBuffer();
56
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));
229 `);
230});
231export default app.fetch;
8 maxQM: number,
9): Promise<Immo[]> {
10 const html = await fetch("https://www.saga.hamburg/immobiliensuche?Kategorie=APARTMENT").then(res => res.text());
11 const exploredBefore = (await blob.getJSON("immos") || []) as string[];
12
32 const location = immo.querySelector("p.pb-3")?.textContent ?? "Adresse nicht gefunden";
33
34 const detailsHTML = await fetch("https://www.saga.hamburg" + detailURL).then(res => res.text());
35
36 const details = new JSDOM(detailsHTML).window.document;
229 `);
230});
231export default app.fetch;
165 code: newCode,
166 });
167 fetch('/save', { method: "POST", body }).then(() => {
168 document.getElementById('code-input-hidden').value = newCode;
169 document.getElementById('preview-iframe').src += '';