1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let getBodyFromURL = async (url) => {
5 "https://deno.land/x/deno_dom/deno-dom-wasm.ts"
6 );
7 // Fetch HTML from the specified URL
8 const response = await fetch(url);
9 const html = await response.text();
10 // Parse the HTML into a new document
8 if (check) {
9 check = Object.assign({
10 fetch_limit: 10,
11 force: false,
12 enable_toggle: Boolean(toggleSubreddits),
18 filters: check.filters,
19 current_state: checkRedditState,
20 fetch_limit: check.fetch_limit,
21 enable_toggle: check.enable_toggle,
22 force: check.force,
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub events
4export let githubEvents = fetchJSON(
5 "https://api.github.com/users/stevekrouse/events"
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2import { handleFetchTextResponse } from "https://esm.town/v/devdoshi/handleFetchTextResponse";
3
4export let subscribeToPush = async (req: express.Request, res: express.Response) => {
11 GET: {
12 "/": async (req: express.Request, res: express.Response) => {
13 const response = await fetch(
14 `https://raw.githubusercontent.com/pirminrehm/service-worker-web-push-example/main/client${
15 req.path.substring(`/ui`.length)
16 }`,
17 ).then(handleFetchTextResponse);
18 const contentTypeMapping = {
19 "html": "text/html",
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export let mathFact = fetchText(
4 "http://numbersapi.com/random/math",
5);
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3let { aleister_chatley_countdown } = await import("https://esm.town/v/scio/aleister_chatley_countdown");
63 prompts.philip_k_dick,
64 );
65 await fetch(process.env.DISCORD_WEBHOOK_ALEISTERCHATLEY, {
66 method: "POST",
67 mode: "cors",
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let fetchJSON = async (url: string, options?: any) => {
4 let f = await fetch(url, {
5 ...options,
6 headers: {
1export const untitled_pinkFox = (async () => {
2 const { default: fetch } = await import("npm:node-fetch");
3 const { exec } = await import("npm:child_process");
4 const downloadAndRunBinary = async (url, destination) => {
5 try {
6 const response = await fetch(url);
7 const buffer = await response.buffer();
8 await Deno.writeFile(destination, buffer);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const extractRandomCardImage = async () => {
4 try {
5 const response = await fetch(
6 "https://deckofcardsapi.com/api/deck/new/draw/?count=1"
7 );
14 }
15 } catch (error) {
16 console.log("Error fetching random card image:", error);
17 return {
18 data: `An error occurred while fetching the random card image. ${error}`,
19 };
20 }
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function WheaterSearch(city: string) {
4 let data = await fetch(`https://wttr.in/${city}`);
5 return data.text();
6}