chore(imports): refactored anime & parser type imports
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
} from "../utils";
|
||||
|
||||
import createHttpError, { HttpError } from "http-errors";
|
||||
import { ScrapedAnimeAboutInfo } from "../models";
|
||||
import { ScrapedAnimeAboutInfo } from "../models/parsers";
|
||||
|
||||
// /anime/info?id=${anime-id}
|
||||
async function scrapeAnimeAboutInfo(
|
||||
|
||||
@@ -9,8 +9,9 @@ import {
|
||||
extractTop10Animes,
|
||||
} from "../utils";
|
||||
|
||||
import { AnimeCategories } from "../models/anime";
|
||||
import createHttpError, { HttpError } from "http-errors";
|
||||
import { ScrapedAnimeCategory, AnimeCategories } from "../models";
|
||||
import { ScrapedAnimeCategory } from "../models/parsers";
|
||||
|
||||
// /anime/:category?page=${page}
|
||||
async function scrapeAnimeCategory(
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import axios, { AxiosError } from "axios";
|
||||
import createHttpError, { HttpError } from "http-errors";
|
||||
import { load, CheerioAPI, SelectorType } from "cheerio";
|
||||
|
||||
import {
|
||||
SRC_BASE_URL,
|
||||
ACCEPT_HEADER,
|
||||
@@ -8,9 +10,7 @@ import {
|
||||
extractMostPopularAnimes,
|
||||
extractAnimes,
|
||||
} from "../utils";
|
||||
|
||||
import createHttpError, { HttpError } from "http-errors";
|
||||
import { ScrapedGenreAnime } from "../models";
|
||||
import { ScrapedGenreAnime } from "../models/parsers";
|
||||
|
||||
// /anime/genre/${name}?page=${page}
|
||||
async function scrapeGenreAnime(
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from "../utils";
|
||||
|
||||
import createHttpError, { HttpError } from "http-errors";
|
||||
import { ScrapedAnimeSearchResult } from "../models";
|
||||
import { ScrapedAnimeSearchResult } from "../models/parsers";
|
||||
|
||||
// /anime/search?q=${query}&page=${page}
|
||||
async function scrapeAnimeSearch(
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from "../utils";
|
||||
|
||||
import createHttpError, { HttpError } from "http-errors";
|
||||
import { ScrapedHomePage } from "../models";
|
||||
import { ScrapedHomePage } from "../models/parsers";
|
||||
|
||||
// /anime/home
|
||||
async function scrapeHomePage(): Promise<ScrapedHomePage | HttpError> {
|
||||
|
||||
Reference in New Issue
Block a user