orangeSolemultiembed-dood.tsx5 matches
9};
1011async function parseHTML(html) {
12const result = {
13servers: [],
98}
99100async function solveCaptcha(predictions, captchaData) {
101const { captchaId, captcha, promptText } = captchaData;
102if (!captchaId) throw new Error("captcha_id not found.");
116}
117118async function solveImageCaptchas(captcha) {
119await Promise.all(
120captcha.map(async obj => {
123formData.append("file", new Blob([blob], { type: "image/jpeg" }), "blob");
124125const res = await fetch("https://www.nyckel.com/v1/functions/5m8hktimwukzpb8r/invoke", {
126method: "POST",
127body: formData,
144* @typedef {Object} Env
145*/
146export default async function(request, env, ctx) {
147const url = new URL(request.url);
148if (!url.pathname.startsWith("/api")) {
6});
78export default async function(interval: Interval) {
9// Initializing a client
10const notion = new Client({
getDatagetData.tsx1 match
1// @val-town/api
2export default async function(req: Request): Promise<Response> {
3return Response.json({
4status: "ok",
ColosseumcheckAvail.tsx12 matches
1112**/
13export async function checkAvail({ type, date, debug, notify }: {
14type: string;
15date: string;
26];
27const USER_AGENT = UA_LIST[Math.floor(Math.random() * UA_LIST.length)];
28function getHeaders(opts) {
29const { cookies, referer } = opts;
30const cookieObj = cookies
74},
75};
76function findThatScript(htmlText: string) {
77const $ = cheerio.load(htmlText);
78const firstBodyScript = $("body script")[0];
92return res;
93}
94async function safeEvalOctofenceTokenValTown(script: string) {
95const res = await fetch("https://api.val.town/v1/eval", {
96method: "POST",
106return await res.json();
107}
108async function getOctofenceToken(htmlText: string) {
109const script = findThatScript(htmlText);
110// octofence_token
112return octofence_token;
113}
114function fetchCalendar(
115id: string,
116month: number,
137});
138}
139async function getToken(id: string, thisMonth: number, eventPageUrl: string) {
140const resWithAuthToken = await fetchCalendar(id, thisMonth, eventPageUrl);
141const htmlWithAuth = await resWithAuthToken.text();
159return token;
160}
161function fetchDateSlots(
162date: string,
163id: string,
176});
177}
178function extractAvailSlots(html: string): Array<{
179time: string;
180tickets: number;
212debug && console.log("Cal html: ", calThisMonth);
213// Parse cal
214function extractAvailDates(calHtml: string) {
215const $ = cheerio.load(calHtml);
216const availableDatesEL = $(".available.active").toArray();
222];
223debug && console.log("Avail dates: ", availableDates);
224function isDateAvail(availableDates, date) {
225const compare = (d) => {
226const dArr = d.split("/");
241coupleSlots = slots.filter((s) => s.tickets >= 2);
242if (coupleSlots.length > 0) {
243function getCartCartLink(
244productId: string,
245performanceId: string,
1import { checkAvail } from "https://esm.town/v/lirenxn/checkAvail";
23export async function runCheckUnderground() {
4const result = await checkAvail({
5type: "underground",
3import { set } from "https://esm.town/v/std/set?v=11";
45export async function runCheckUnderground2() {
6const result = await checkAvail({
7type: "underground",
ColosseummailMeTheLink.tsx1 match
1112**/
13export function mailMeTheLink({ calLink, date, type, slots }: {
14calLink: string;
15date: string;
nell-parker-townindex.ts1 match
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
Work_Time_Calculator_2main.tsx7 matches
1function parseTimeRanges(daySchedule) {
2// console.log(`Parsing schedule: ${daySchedule}`);
3const timeRanges = daySchedule.match(/(\d{1,2}(?::\d{2})?(?:am|pm)?)/g);
53}
5455function convertTo24HourFormat(time) {
56if (!time) {
57throw new Error("Invalid time input: time is undefined or empty");
91}
9293function calculateDuration(day, startTime, endTime) {
94console.log(`calculateDuration: Calculating duration on ${day} from ${startTime} to ${endTime}`);
95const start24 = convertTo24HourFormat(startTime);
112}
113114function calculateDailyTotal(day, parsedSchedule) {
115console.log(`calculateDailyTotal: Calculating daily total for ${day}`, parsedSchedule);
116let totalMinutes = 0;
130}
131132function calculateWeeklyTotal(day, dailyTotals) {
133console.log(`calculateWeeklyTotal: Calculating weekly total for daily totals for ${day} is`, dailyTotals);
134let totalHours = 0;
148}
149150function isValidDay(day) {
151const validDays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
152return validDays.includes(day.charAt(0).toUpperCase() + day.slice(1).toLowerCase());
153}
154155function calculateWorkTime(schedule) {
156const dailyTotals = [];
157const scheduleArray = schedule.split("\n").filter(Boolean);
1export default async function handleRequest(request: Request): Promise<Response> {
2// this is a function called handleRequest that is exported for use elsewhere and accepts one input
3const { url } = await request.json();
4// the variable url cannot be changed and to the code to wait until the HTTP data is read and and turned into JSON