1import { fetch as proxiedFetch } from "https://esm.town/v/std/fetch";
2import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
3import { convertHTMLToJSON } from "https://esm.town/v/tempguy/liteutils";
4const baseURLReq = await fetch(
5 "https://multiembed.mov?video_id=114472&tmdb=1&s=1&e=2",
6 {
17};
18
19const baseReq = await proxiedFetch(baseURL, {
20 "headers": headers,
21 "body":
29const source = match[1];
30
31const serverList = await proxiedFetch("https://streambucket.net/response.php", {
32 method: "POST",
33 body: `token=${source}`,
41});
42console.log(await convertHTMLToJSON(await serverList.text()));
43const embedPage = await proxiedFetch(
44 "https://tempguy-copperscorpion.web.val.run?destination="
45 + encodeURIComponent(
68if (!match) throw new Error("No match found");
69console.log(url);
70const player = await fetch(url[1]);
71const regex = /eval\(function\(h,u,n,t,e,r\).*?\("(.*?)",\d*?,"(.*?)",(\d*?),(\d*?),\d*?\)\)/;
72const linkRegex = /file:"(.*?)"/;
233});
234
235export default app.fetch;
1fetch contents of a specific wikipedia page using `?title=`param. will return nothing if page doesn't exactly match. example: https://jamiedubs-wikipediapage.web.val.run/?title=Berlin
2
3for a more search-oriented approach, try https://www.val.town/v/jamiedubs/searchWikipedia
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let currency = async (desired, base = "usd", amount = 1) => {
4 let { rates } = await fetchJSON(`https://open.er-api.com/v6/latest/${base}`);
5 if (rates && rates[desired.toUpperCase()]) return amount * (rates[desired.toUpperCase()]);
6 else {
7 let { rates } = await fetchJSON(
8 `https://api.coingecko.com/api/v3/exchange_rates?&x_cg_demo_api_key=${Deno.env.get("COINGECKO_API_KEY")}`,
9 );
1# Fetch Template
2Example template to quickly get started with a backend for Fetch in Framer.
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}
1# Fetch Template
2Example template to quickly get started with a backend for Fetch in Framer.
10});
11
12export default app.fetch;
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
9 }[];
10}> => {
11 const authRes = await fetch("https://api.resy.com/3/auth/password", {
12 "headers": {
13 "authorization":
45});
46
47export default app.fetch;