aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2023-08-18 23:16:24 +0530
committerRitesh Ghosh <[email protected]>2023-08-18 23:16:24 +0530
commit29924b6982b9208dbe9029887fdb0107bf375be5 (patch)
tree3b76ec594f1bc4f020cf5a517eb7b488615fc106 /src
parent62e51c4f9fc57b0598eb123c36764d6139b88369 (diff)
downloadaniwatch-api-29924b6982b9208dbe9029887fdb0107bf375be5.tar.xz
aniwatch-api-29924b6982b9208dbe9029887fdb0107bf375be5.zip
style(animeEpisodeSrcs): updated endpoint comment
Diffstat (limited to 'src')
-rw-r--r--src/controllers/animeEpisodeSrcs.controller.ts2
-rw-r--r--src/parsers/animeEpisodeSrcs.ts6
-rw-r--r--src/routes/index.ts2
3 files changed, 4 insertions, 6 deletions
diff --git a/src/controllers/animeEpisodeSrcs.controller.ts b/src/controllers/animeEpisodeSrcs.controller.ts
index 04bcaaa..2601c9b 100644
--- a/src/controllers/animeEpisodeSrcs.controller.ts
+++ b/src/controllers/animeEpisodeSrcs.controller.ts
@@ -4,7 +4,7 @@ import { scrapeAnimeEpisodeSources } from "../parsers";
import { AnimeServers, Servers } from "../models/anime";
import { AnimeEpisodeSrcsQueryParams } from "../models/controllers";
-// /anime/episode-src?id=${episodeId}?server=${server}&category=${category (dub or sub)}
+// /anime/episode-srcs?id=${episodeId}?server=${server}&category=${category (dub or sub)}
const getAnimeEpisodeSources: RequestHandler<
unknown,
Awaited<ReturnType<typeof scrapeAnimeEpisodeSources>>,
diff --git a/src/parsers/animeEpisodeSrcs.ts b/src/parsers/animeEpisodeSrcs.ts
index 7a0bc0a..7746ec0 100644
--- a/src/parsers/animeEpisodeSrcs.ts
+++ b/src/parsers/animeEpisodeSrcs.ts
@@ -17,12 +17,11 @@ import { RapidCloud, StreamSB, StreamTape } from "../extractors";
// streamsb -> 5
// streamtape -> 3
-// /anime/episode-src?id=${episodeId}?server=${server}&category=${category (dub or sub)}
+// /anime/episode-srcs?id=${episodeId}?server=${server}&category=${category (dub or sub)}
async function scrapeAnimeEpisodeSources(
episodeId: string,
server: AnimeServers = Servers.VidStreaming,
category: "sub" | "dub" = "sub"
- // server:
): Promise<ScrapedAnimeEpisodesSources | HttpError> {
if (episodeId.startsWith("http")) {
const serverUrl = new URL(episodeId);
@@ -68,14 +67,13 @@ async function scrapeAnimeEpisodeSources(
},
}
);
- // console.log(resp, "\n\n");
const $: CheerioAPI = load(resp.data.html);
let serverId: string | null = null;
try {
- console.log("THIS IS THE SERVER: ", server);
+ console.log("THE SERVER: ", server);
switch (server) {
case Servers.VidCloud: {
diff --git a/src/routes/index.ts b/src/routes/index.ts
index 979f185..7d6a226 100644
--- a/src/routes/index.ts
+++ b/src/routes/index.ts
@@ -35,7 +35,7 @@ router.get("/search/suggest", getAnimeSearchSuggestion);
router.get("/episodes/:animeId", getAnimeEpisodes);
// episodeId=steinsgate-3?ep=230
-// /anime/episode-src?id=${episodeId}?server=${server}&category=${category (dub or sub)}
+// /anime/episode-srcs?id=${episodeId}?server=${server}&category=${category (dub or sub)}
router.get("/episode-srcs", getAnimeEpisodeSources);
// /anime/producer/${name}?page=${page}