Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/image-url.jpg%20%22Image%20title%22?q=fetch&page=677&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 9506 results for "fetch"(2337ms)

healthdatasimplemain.tsx1 match

@ejfox•Updated 8 months ago
39// Client-side rendering
40function client() {
41 fetch('/api/health-data')
42 .then(response => response.json())
43 .then(data => {

handlermain.tsx1 match

@tempdev•Updated 8 months ago
60}
61async function getMeta(imdbId: string): Promise<Meta> {
62 const searchResult = await fetch(`${primewireBase}/api/v1/show?key=${primewireApiKey}&imdb_id=${imdbId}`);
63 return await searchResult.json() as Meta;
64}

srcbackendmain.tsx5 matches

@tempdev•Updated 8 months ago
20}
21
22export async function Fetcher(url: string, referer: string) {
23 const design = `?destination=${encodeURIComponent(url)}&referer=${encodeURIComponent(referer)}`;
24 const request = await fetch(`https://eb305cc8-973e-4f2d2-85dd-b1f16649c4d4.cloudflarepreviews.com/proxy${design}`, {
25 headers: {
26 "Cookie": "token=35b2fb9d503a9c50e0564db305bbe971817e63dbfb88c61461eef2afaf0fd6f1",
41 };
42 const baseUrl = "https://d000d.com";
43 const doodData = await Fetcher(`${baseUrl}/e/${id}`, baseUrl);
44 const poster = "";
45 const dataForLater = doodData.match(/\?token=([^&]+)&expiry=/)?.[1];
46 const path = doodData.match(/\$\.get\('\/pass_md5([^']+)/)?.[1];
47 const thumbnailTrack = `https:${doodData.match(/thumbnails:\s\{\s*vtt:\s'([^']*)'/)?.[1]}`;
48 const doodPage = await Fetcher(`${baseUrl}/pass_md5${path}`, `${baseUrl}/e/${id}`);
49
50 returnData.extractedURL = `${doodPage}${nanoid()}?token=${dataForLater}&expiry=${Date.now()}`;
71 };
72 const baseUrl = "https://streamtape.com";
73 const embed = await Fetcher(`${baseUrl}/e/${id}`, "");
74 const match = embed.match(/robotlink'\)\.innerHTML = '(.*)'/);
75 if (!match) throw new Error("No match found");

FindFraudTrendsUsingGPTmain.tsx1 match

@mjweaver01•Updated 8 months ago
151});
152
153export default app.fetch;

forbetEventScrappermain.tsx1 match

@nmsilva•Updated 8 months ago
1import { load } from "https://esm.sh/cheerio";
2import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
3
4const defaultAsEmptyString = (value) => value ?? "";

successiveVioletGrousemain.tsx5 matches

@ankitkr0•Updated 8 months ago
22
23 useEffect(() => {
24 fetchLeaderboard();
25 }, []);
26
38 }, [isHolding]);
39
40 const fetchLeaderboard = async () => {
41 const response = await fetch('/leaderboard');
42 const data = await response.json();
43 setLeaderboard(data);
49 setGameState('end');
50 await submitScore();
51 await fetchLeaderboard();
52 };
53
54 const submitScore = async () => {
55 await fetch('/submit-score', {
56 method: 'POST',
57 headers: { 'Content-Type': 'application/json' },

VALLErunmain.tsx2 matches

@ubyk•Updated 8 months ago
918 code: newCode,
919 });
920 fetch('/save', { method: "POST", body }).then(() => {
921 document.getElementById('code-input-hidden').value = newCode;
922 document.getElementById('preview-iframe').src += '';
1284 app.post("/", mainHandler);
1285
1286 return passwordAuth(app.fetch, { verifyPassword: verifyToken });
1287}

htmlkitmain.tsx9 matches

@yawnxyz•Updated 8 months ago
1// import { fetch } from "https://esm.town/v/std/fetch";
2import { convertHtmlToMarkdown } from 'npm:@yawnxyz/dom-to-semantic-markdown';
3import { JSDOM } from 'npm:jsdom';
10export async function getHtmlFromUrl(url) {
11 try {
12 const response = await fetch(url);
13 const html = await response.text();
14
17 return $.html();
18 } catch (error) {
19 console.error("Error fetching the URL:", error);
20 return null;
21 }
22}
23
24// todo, pass in html optional, and skip fetch?
25export async function getMetadataFromUrl(url) {
26 const response = await fetch(url, {
27 method: "GET",
28 headers: new Headers({
31 "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8",
32 "Accept-Language": "en-US,en;q=0.5",
33 "Sec-Fetch-Site": "cross-site",
34 "Sec-Fetch-Mode": "navigate",
35 "Sec-Fetch-User": "?1",
36 "Sec-Fetch-Dest": "document",
37 "Referer": "https://www.google.com/",
38 "sec-ch-ua": `"Not A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"`,

getAllNotionDbRowsmain.tsx1 match

@apppeak•Updated 8 months ago
32 console.log(
33 length
34 ? `Successfully fetched ${length} row${length === 1 ? "" : "s"}`
35 : "No rows found",
36 );

faviconGeneratormain.tsx2 matches

@iamseeley•Updated 8 months ago
19
20 try {
21 const response = await fetch(`/generate?prompt=${encodeURIComponent(prompt)}`);
22 if (!response.ok) {
23 throw new Error(`Failed to generate image: ${response.statusText}`);
80 }
81
82 const response = await fetch("https://fal.run/fal-ai/flux/schnell", {
83 method: "POST",
84 headers: {

agentplex-deal-flow-email-fetch1 file match

@anandvc•Updated 6 hours ago

proxyFetch2 file matches

@vidar•Updated 2 days ago