refactor: types dir import

This commit is contained in:
Ritesh Ghosh
2024-01-19 19:55:31 +05:30
parent c0ee0bc7b1
commit 9c37cb0cad
11 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ import {
import axios, { AxiosError } from "axios";
import createHttpError, { type HttpError } from "http-errors";
import { load, type CheerioAPI, type SelectorType } from "cheerio";
import { type ScrapedAnimeAboutInfo } from "../models/parsers/index.js";
import { type ScrapedAnimeAboutInfo } from "../types/parsers/index.js";
// /anime/info?id=${anime-id}
async function scrapeAnimeAboutInfo(
+2 -2
View File
@@ -7,10 +7,10 @@ import {
ACCEPT_ENCODING_HEADER,
} from "../utils/index.js";
import axios, { AxiosError } from "axios";
import { type AnimeCategories } from "../models/anime.js";
import { type AnimeCategories } from "../types/anime.js";
import createHttpError, { type HttpError } from "http-errors";
import { load, type CheerioAPI, type SelectorType } from "cheerio";
import { type ScrapedAnimeCategory } from "../models/parsers/index.js";
import { type ScrapedAnimeCategory } from "../types/parsers/index.js";
// /anime/:category?page=${page}
async function scrapeAnimeCategory(
+2 -2
View File
@@ -7,9 +7,9 @@ import {
import axios, { AxiosError } from "axios";
import { load, type CheerioAPI } from "cheerio";
import createHttpError, { type HttpError } from "http-errors";
import { type AnimeServers, Servers } from "../models/anime.js";
import { type AnimeServers, Servers } from "../types/anime.js";
import { RapidCloud, StreamSB, StreamTape } from "../extractors/index.js";
import { type ScrapedAnimeEpisodesSources } from "../models/parsers/index.js";
import { type ScrapedAnimeEpisodesSources } from "../types/parsers/index.js";
// vidtreaming -> 4
// rapidcloud -> 1
+1 -1
View File
@@ -8,7 +8,7 @@ import {
import axios, { AxiosError } from "axios";
import { load, type CheerioAPI } from "cheerio";
import createHttpError, { type HttpError } from "http-errors";
import { type ScrapedAnimeEpisodes } from "../models/parsers/index.js";
import { type ScrapedAnimeEpisodes } from "../types/parsers/index.js";
// /anime/episodes/${anime-id}
async function scrapeAnimeEpisodes(
+1 -1
View File
@@ -9,7 +9,7 @@ import {
import axios, { AxiosError } from "axios";
import createHttpError, { type HttpError } from "http-errors";
import { load, type CheerioAPI, type SelectorType } from "cheerio";
import type { ScrapedGenreAnime } from "../models/parsers/index.js";
import type { ScrapedGenreAnime } from "../types/parsers/index.js";
// /anime/genre/${name}?page=${page}
async function scrapeGenreAnime(
+1 -1
View File
@@ -10,7 +10,7 @@ import {
import axios, { AxiosError } from "axios";
import createHttpError, { type HttpError } from "http-errors";
import { load, type CheerioAPI, type SelectorType } from "cheerio";
import type { ScrapedProducerAnime } from "../models/parsers/index.js";
import type { ScrapedProducerAnime } from "../types/parsers/index.js";
// /anime/producer/${name}?page=${page}
async function scrapeProducerAnimes(
+1 -1
View File
@@ -9,7 +9,7 @@ import {
import axios, { AxiosError } from "axios";
import createHttpError, { type HttpError } from "http-errors";
import { load, type CheerioAPI, type SelectorType } from "cheerio";
import type { ScrapedAnimeSearchResult } from "../models/parsers/index.js";
import type { ScrapedAnimeSearchResult } from "../types/parsers/index.js";
// /anime/search?q=${query}&page=${page}
async function scrapeAnimeSearch(
+1 -1
View File
@@ -7,7 +7,7 @@ import {
import axios, { AxiosError } from "axios";
import createHttpError, { type HttpError } from "http-errors";
import { load, type CheerioAPI, type SelectorType } from "cheerio";
import type { ScrapedAnimeSearchSuggestion } from "../models/parsers/index.js";
import type { ScrapedAnimeSearchSuggestion } from "../types/parsers/index.js";
// /anime/search/suggest?q=${query}
async function scrapeAnimeSearchSuggestion(
+1 -1
View File
@@ -8,7 +8,7 @@ import {
import axios, { AxiosError } from "axios";
import createHttpError, { type HttpError } from "http-errors";
import { load, type CheerioAPI, type SelectorType } from "cheerio";
import type { ScrapedEpisodeServers } from "../models/parsers/index.js";
import type { ScrapedEpisodeServers } from "../types/parsers/index.js";
// /anime/servers?episodeId=${id}
async function scrapeEpisodeServers(
+1 -1
View File
@@ -7,7 +7,7 @@ import {
import axios, { AxiosError } from "axios";
import createHttpError, { type HttpError } from "http-errors";
import { load, type CheerioAPI, type SelectorType } from "cheerio";
import { type ScrapedEstimatedSchedule } from "../models/parsers/index.js";
import { type ScrapedEstimatedSchedule } from "../types/parsers/index.js";
// /anime/schedule?date=${date}
async function scrapeEstimatedSchedule(
+1 -1
View File
@@ -8,7 +8,7 @@ import {
} from "../utils/index.js";
import axios, { AxiosError } from "axios";
import createHttpError, { type HttpError } from "http-errors";
import type { ScrapedHomePage } from "../models/parsers/index.js";
import type { ScrapedHomePage } from "../types/parsers/index.js";
import { load, type CheerioAPI, type SelectorType } from "cheerio";
// /anime/home