aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2023-08-13 19:40:45 +0530
committerRitesh Ghosh <[email protected]>2023-08-13 19:40:45 +0530
commitaa4c922a33d83ba291aee761f0d6acb917981aa9 (patch)
tree6988bf62d6e003ffcac7a4af8f34c533c5260010 /src
parent09ddda2799c68df8cf5b66ecface093c75f4c7a1 (diff)
downloadaniwatch-api-aa4c922a33d83ba291aee761f0d6acb917981aa9.tar.xz
aniwatch-api-aa4c922a33d83ba291aee761f0d6acb917981aa9.zip
fix(animeCategory): added `animeCategory` name
Diffstat (limited to 'src')
-rw-r--r--src/parsers/animeCategory.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parsers/animeCategory.ts b/src/parsers/animeCategory.ts
index 7afe74c..025316e 100644
--- a/src/parsers/animeCategory.ts
+++ b/src/parsers/animeCategory.ts
@@ -47,6 +47,10 @@ async function scrapeAnimeCategory(
const selector: SelectorType =
"#main-content .tab-content .film_list-wrap .flw-item";
+ const categoryNameSelector: SelectorType =
+ "#main-content .block_area .block_area-header .cat-heading";
+ res.category = $(categoryNameSelector)?.text()?.trim() ?? category;
+
res.hasNextPage =
$(".pagination > li").length > 0
? $(".pagination li.active").length > 0