aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2024-07-21 19:02:50 +0530
committerGitHub <[email protected]>2024-07-21 19:02:50 +0530
commit6eb0dce2d33fcadebc6cb5a45febd78798561b9a (patch)
tree503b584586dc259ad486a727b983a55d02d18aa0 /src/utils
parent160eb2222b1a01147913f53a32175a2b6a28b0fd (diff)
parent94664abdfdf1be8820f96afe081182f59281f4cb (diff)
downloadaniwatch-api-6eb0dce2d33fcadebc6cb5a45febd78798561b9a.tar.xz
aniwatch-api-6eb0dce2d33fcadebc6cb5a45febd78798561b9a.zip
Merge pull request #60 from WBRK-dev/main
feat: estimated schedule && home && japenese anime names
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/methods.ts16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/utils/methods.ts b/src/utils/methods.ts
index 1ed0c88..9f57ff9 100644
--- a/src/utils/methods.ts
+++ b/src/utils/methods.ts
@@ -39,6 +39,10 @@ export const extractAnimes = (
.find(".film-detail .film-name .dynamic-name")
?.text()
?.trim(),
+ jname: $(el)
+ .find(".film-detail .film-name .dynamic-name")
+ ?.attr("data-jname")
+ ?.trim() || null,
poster:
$(el)
.find(".film-poster .film-poster-img")
@@ -102,6 +106,7 @@ export const extractTop10Animes = (
.trim() || null,
rank: Number($(el).find(".film-number span")?.text()?.trim()) || null,
name: $(el).find(".film-detail .dynamic-name")?.text()?.trim() || null,
+ jname: $(el).find(".film-detail .dynamic-name")?.attr("data-jname")?.trim() || null,
poster:
$(el)
.find(".film-poster .film-poster-img")
@@ -150,17 +155,16 @@ export const extractMostPopularAnimes = (
?.slice(1)
.trim() || null,
name: $(el).find(".film-detail .dynamic-name")?.text()?.trim() || null,
- poster:
- $(el)
- .find(".film-poster .film-poster-img")
- ?.attr("data-src")
- ?.trim() || null,
jname:
$(el)
.find(".film-detail .film-name .dynamic-name")
.attr("data-jname")
?.trim() || null,
-
+ poster:
+ $(el)
+ .find(".film-poster .film-poster-img")
+ ?.attr("data-src")
+ ?.trim() || null,
episodes: {
sub:
Number($(el)?.find(".fd-infor .tick .tick-sub")?.text()?.trim()) ||