17
18 try {
19 const response = await fetch('/download', {
20 method: 'POST',
21 headers: {
119 }
120
121 // Fetch video details and download link via yt-dlp proxy
122 const ytResponse = await fetch('https://yt-dlp-proxy.deno.dev/extract', {
123 method: 'POST',
124 headers: {
17
18 try {
19 const response = await fetch('/download', {
20 method: 'POST',
21 headers: {
119 }
120
121 // Fetch video details and download link via yt-dlp proxy
122 const ytResponse = await fetch('https://yt-dlp-proxy.deno.dev/extract', {
123 method: 'POST',
124 headers: {
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
52
53 useEffect(() => {
54 async function fetchWeather() {
55 try {
56 const response = await fetch(
57 "https://api.open-meteo.com/v1/forecast?latitude=1.3521&longitude=103.8198&hourly=temperature_2m,weathercode¤t_weather=true&temperature_unit=celsius&windspeed_unit=kmh&precipitation_unit=mm&timezone=Asia%2FSingapore&forecast_days=1"
58 );
61 setLoading(false);
62 } catch (error) {
63 console.error("Weather fetch failed", error);
64 setLoading(false);
65 }
66 }
67 fetchWeather();
68 }, []);
69
20
21 try {
22 const response = await fetch('/chat', {
23 method: 'POST',
24 headers: { 'Content-Type': 'application/json' },
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
58 try {
59 // Simulate volume boost
60 const result = await fetch('/volume-boost', {
61 method: 'POST',
62 body: JSON.stringify({ amount: boostAmount })
75 try {
76 // Simulate price boost
77 const result = await fetch('/price-boost', {
78 method: 'POST',
79 body: JSON.stringify({ amount: boostAmount })
5
6export default async function(interval: Interval) {
7 const response = await fetch("https://www.sperrychalet.com/vacancy_s.html");
8 const body = await response.text();
9 const $ = cheerio.load(body);
30 if (url.pathname === "/test.json") return Response.json({ ok: true });
31 if (url.pathname !== "/")
32 return fetch(
33 `https://stevekrouse.github.io/${url.pathname}${url.search}`,
34 request as any as RequestInit,
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const gsheet_call = async (service_account, sheet_id, method, action, data) => {
10 const token = await getToken(service_account, googleAuthOptions);
11 console.log(`https://sheets.googleapis.com/v4/spreadsheets/${sheet_id}/${action}`);
12 const result = fetchJSON(
13 `https://sheets.googleapis.com/v4/spreadsheets/${sheet_id}/${action}`,
14 {