25
26 try {
27 const response = await fetch("/", {
28 method: "POST",
29 body: JSON.stringify({ prompt, currentCode: code }),
25
26 try {
27 const response = await fetch("/", {
28 method: "POST",
29 body: JSON.stringify({ prompt, currentCode: code }),
25
26 try {
27 const response = await fetch("/", {
28 method: "POST",
29 body: JSON.stringify({ prompt, currentCode: code }),
1import CryptoJS from "npm:crypto-js";
2const regex = /case (0[xX][\da-fA-F]+):([a-zA-Z\d]+)=(.),([a-zA-Z\d]+)=(.)/gm;
3const req = await fetch("https://southcloud.tv/js/player/a/sc/prod/p1-debug.min.js");
4const str = await req.text();
5let m;
1import { base } from "https://esm.town/v/tempguy/southcloud";
2
3async function fetchStreamLink() {
4 try {
5 const headers = {
8 "Accept-Language": "en-US,en;q=0.5",
9 "x-site": "anicrush",
10 "Sec-Fetch-Dest": "empty",
11 "Sec-Fetch-Mode": "cors",
12 "Sec-Fetch-Site": "same-site",
13 };
14
15 // Fetch search results
16 const search = await fetch("https://api.anicrush.to/shared/v2/movie/list?keyword=One Piece&limit=10&page=1", {
17 headers,
18 });
21 const id = searchResult.result.movies[0].id;
22
23 // Fetch server data
24 const serverData = await fetch(`https://api.anicrush.to/shared/v2/episode/servers?_movieId=${id}&ep=1`, {
25 headers,
26 });
28 const serverId = serverDataResult.result.sub[0].server;
29
30 // Fetch server link
31 const serverLink = await fetch(
32 `https://api.anicrush.to/shared/v2/episode/sources?_movieId=${id}&ep=1&sv=${serverId}&sc=sub`,
33 { headers },
36 const sid = new URL(serverLinkResult.result.link).pathname.split("/")[3];
37
38 // Fetch stream link
39 const streamLink = await fetch(`https://southcloud.tv/e/ajax/p-1/getSources?id=${sid}`);
40 const streamLinkResult = await streamLink.json();
41
44 console.log(base(streamLinkResult.sources)[0].file);
45 } catch (error) {
46 console.error("Error fetching stream link:", error);
47 }
48}
49
50// Call the function
51fetchStreamLink();
1import CryptoJS from "npm:crypto-js";
2const regex = /case (0[xX][\da-fA-F]+):([a-zA-Z\d]+)=(.),([a-zA-Z\d]+)=(.)/gm;
3const req = await fetch("https://southcloud.tv/js/player/a/sc/prod/p1-debug.min.js");
4const str = await req.text();
5let m;
21 try {
22 // First API call - Get search results
23 const searchResult = await fetch("/api/search", {
24 method: "POST",
25 headers: { "Content-Type": "application/json" },
32 // Second API call - Get summary
33 setSummaryLoading(true);
34 const summaryResult = await fetch("/api/summarize", {
35 method: "POST",
36 headers: { "Content-Type": "application/json" },
125
126 // Search using SerpApi
127 const searchResponse = await fetch(
128 `https://serpapi.com/search.json?q=${encodeURIComponent(query)}&api_key=${Deno.env.get("SERP_API_KEY")}`,
129 );
10const DEMO_MODE = true;
11
12// Time window for fetching activity
13const HOURS_TO_FETCH = 30;
14
15// GitHub Settings
90 <h2>{type}</h2>
91 {items.length === 0
92 ? <p>No {type.toLowerCase()} found in the last {HOURS_TO_FETCH} hours</p>
93 : (
94 <ul className="list">
119 useEffect(() => {
120 Promise.all([
121 fetch("/api/prs").then(async (res) => {
122 if (!res.ok) {
123 const error = await res.json();
124 throw new Error(error.message || "Failed to fetch PRs");
125 }
126 return res.json();
127 }),
128 fetch("/api/issues").then(async (res) => {
129 if (!res.ok) {
130 const error = await res.json();
131 throw new Error(error.message || "Failed to fetch issues");
132 }
133 return res.json();
197 }
198
199 const timeAgo = new Date(Date.now() - (HOURS_TO_FETCH * MILLISECONDS_PER_HOUR)).toISOString();
200
201 const response = await fetch(
202 `https://api.github.com/search/issues?q=repo:${GITHUB.REPOSITORY}+author:${GITHUB.USERNAME}+created:>${timeAgo}+type:pr`,
203 {
205 "Accept": "application/vnd.github.v3+json",
206 "Authorization": `Bearer ${githubToken}`,
207 "User-Agent": "Val-Town-PR-Fetcher",
208 },
209 },
212 if (!response.ok) {
213 const error = await response.json();
214 return createErrorResponse(error.message || "Failed to fetch from GitHub", response.status);
215 }
216
231 }
232
233 const timeAgo = new Date(Date.now() - (HOURS_TO_FETCH * MILLISECONDS_PER_HOUR)).toISOString();
234
235 const query = `
252 `;
253
254 const response = await fetch("https://api.linear.app/graphql", {
255 method: "POST",
256 headers: {
263 if (!response.ok) {
264 const error = await response.json();
265 return createErrorResponse(error.message || "Failed to fetch from Linear", response.status);
266 }
267
54 setLoading(true);
55 try {
56 const response = await fetch("/", {
57 method: "POST",
58 body: JSON.stringify({ level, password, requirements }),
54 setLoading(true);
55 try {
56 const response = await fetch("/", {
57 method: "POST",
58 body: JSON.stringify({ level, password, requirements }),