refactor: types dir import
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user