1import { capturePostHogEvent } from "https://esm.town/v/ianvph/capturePostHogEvent";
23export default async function(req: Request): Promise<Response> {
4if (req.method !== "POST") {
5return Response.json({ ok: "only post request" });
httpStatusBehaviormain.tsx1 match
11];
1213export default async function(req: Request): Promise<Response> {
14const url = new URL(req.url);
15if (url.pathname === "/") {
resumeRecsmain.tsx1 match
3const tokenBucket = new TokenBucket(5, 1/12);
45export async function getRecommendations(jobDescription, resume, apiKey) {
67if (!tokenBucket.consume()) {
6};
78export default async function(req: Request): Promise<Response> {
9let key = new URL(req.url).pathname;
10
AtelierHarfangToRSSmain.tsx2 matches
4import { DOMParser } from "npm:linkedom@0.16.10";
56function response(message: string, contentType = "text/markdown"): Response {
7const headers = new Headers();
8headers.set("Access-Control-Allow-Origin", "*");
17}
1819export default async function(req: Request): Promise<Response> {
20const url = new URL(`https://atelierharfang.ch`);
21const html = await fetch(url.toString(), {
TanStackBlogToRSSmain.tsx2 matches
2import { DOMParser } from "npm:linkedom@0.16.10";
34function response(message: string, contentType = "text/markdown"): Response {
5const headers = new Headers();
6headers.set("Access-Control-Allow-Origin", "*");
15}
1617export default async function(req: Request): Promise<Response> {
18const url = new URL(`https://tanstack.com/blog`);
19const html = await fetch(url.toString(), {
story_wordcountmain.tsx11 matches
910// Fetch the HTML content of the given URL
11async function fetchHtml(url: string): Promise<string> {
12const response = await fetch(url, {
13method: "GET",
3132// Extract titles by manually parsing the HTML content
33function titleExtractor(html: string): string[] {
34const regex = /<a[^>]*href="([^"]*threads\/[^"]*)"[^>]*class="[^"]*contentRow-title[^"]*">/g;
35const titles = [];
4445// Generates RSS feed links from a base URL
46function urlGenerator(url: string) {
47return [
48`${url}threadmarks.rss?threadmark_category=13`,
51}
5253// Utility function to delay execution
54function delay(ms: number): Promise<void> {
55return new Promise(resolve => setTimeout(resolve, ms));
56}
5758// Verifies the validity of each feed URL by checking its contents
59async function urlVerifier(feeds: string[]): Promise<string[]> {
60const usefulUrls: string[] = [];
61949596// Main function to execute the scraping process
97async function main() {
98const baseUrl = "https://forums.spacebattles.com/search/69363141/?t=post&c[content]=thread&c[users]=3ndless&o=date";
99try {
143}
144145// Main function to process the flow
146async function main(): Promise<number[]> {
147const titles = titleExtractor();
148// console.log("Titles Extracted:", titles); // Debugging log
157}
158159// Example of how to call the main function and handle the result
160main().then(wordCounts => {
161console.log("Final Output:", wordCounts);
9});
1011export default async function handler(request: Request) {
12if (request.method !== "POST") {
13return html(`
prism_feature_notificationsmain.tsx3 matches
5const confidenceThreshold = 0.8;
67function randomlyPickFeature(featuresAboveConfidenceThreshold) {
8return featuresAboveConfidenceThreshold[Math.floor(Math.random() * featuresAboveConfidenceThreshold.length)];
9}
1011function getFeatureLink(feature) {
12const { index } = feature;
13return `https://thesephist--prism-start-app.modal.run/f/${modelName}/${index}?layout=2`;
14}
1516export default async function(interval: Interval) {
17const response = await fetch(dictionaryUrl);
18const { features } = await response.json();
dailyDadJokemain.tsx1 match
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
34export async function dailyDadJoke() {
5let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
6return email({