1import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=42";
34export default async function (req: Request) {
27}
2829const gist = await fetchJSON(`https://api.github.com/gists/${id}`);
30if (gist.owner.login != author) {
31return new Response("Unauthorized", {
untitled_cyanLampreymain.tsx1 match
3import { timed } from "https://esm.town/v/stevekrouse/timed";
45const dateme_html_cache = await (await fetch("https://stevekrouse-dateme.web.val.run/")).text();
67await blob.delete("dateme_html_cache");
1import { fetch } from "https://esm.town/v/std/fetch";
2export default async function(req: Request): Promise<Response> {
3const p = Object.fromEntries(new URL(req.url).searchParams);
4if (!p.url) return Response.json("missing url");
5console.log("checking", p.url);
6const res = await fetch(p.url);
7if (!res.ok) return Response.json(res.status);
8const txt = await res.text();
gptMemoryManagermain.tsx1 match
458});
459460return app.fetch(req);
461};
youtubeEndpointmain.tsx10 matches
2import { YouTube } from 'https://deno.land/x/youtube@v0.3.0/mod.ts';
34export async function fetchVideoDetails(req) {
5const url = new URL(req.url);
6let yturl = url.searchParams.get("yturl") || "";
2930try {
31let response = await fetch(apiUrl);
32let data = await response.json();
33if (!data.items || data.items.length === 0) {
84const categoryId = item.snippet.categoryId;
85apiUrl = `https://www.googleapis.com/youtube/v3/videoCategories?part=snippet&id=${categoryId}&key=${apiKey}`;
86response = await fetch(apiUrl);
87data = await response.json();
88const category = data.items && data.items.length > 0 ? data.items[0].snippet.title : 'N/A';
94break;
95case 'transcript':
96async function fetchcaptions(videoId) {
97const WATCH_URL = `https://www.youtube.com/watch?v=${videoId}`;
9899try {
100const response = await fetch(WATCH_URL);
101const html = await response.text();
102const jsonMatch = html.match(/"captions":({.*?}), "videoDetails"/);
110111const captionsUrl = captionsJson.captionTracks[0].baseUrl;
112const captionsResponse = await fetch(captionsUrl);
113const captionsText = await captionsResponse.text();
114return captionsText;
115} catch (error) {
116console.error('Failed to fetch Youtube captions:', error);
117throw error;
118}
119}
120121fetchcaptions(videoId).then(captions => {
122return new Response(captions);
123}).catch(error => {
124console.error('Error fetching captions:', error)
125});
126130return new Response(responseContent);
131} catch (error) {
132console.error("Error fetching video details:", error);
133throw error;
134}
untitled_ivoryFishmain.tsx4 matches
1import { hamptonzachary29@gmail.com} from "https://esm.town/v/std/email?v=9";
23// Fetches a random joke.
4async function fetchRandomJoke() {
5const response = await fetch(
6"https://official-joke-api.appspot.com/random_joke",
7);
9}
1011const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;
isMyWebsiteDownmain.tsx3 matches
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetch } from "https://esm.town/v/std/fetch";
34export const isMyWebsiteDown = async () => {
11try {
12const start = Date.now();
13const res = await fetch(URL);
14const millisecondsSpent = Date.now() - start;
15const jsonData = await res.json();
25}
26catch (e) {
27reason = `couldn't fetch: ${e}`;
28ok = false;
29}
clerk_hono_pocmain.tsx1 match
111}
112});
113export default app.fetch;
11app.get("/edit/:blob", async (c) => c.html(`TODO: Edit ${c.req.param("blob")}`));
12app.get("/delete/:blob", async (c) => c.html(`TODO: Delete ${c.req.param("blob")}`));
13export default basicAuth(app.fetch);
11app.get("/edit/:blob", async (c) => c.html(`TODO: Edit ${c.req.param("blob")}`));
12app.get("/delete/:blob", async (c) => c.html(`TODO: Delete ${c.req.param("blob")}`));
13export default basicAuth(app.fetch);