mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 10:55:10 +00:00
fix: comprehensive diagnostic sweep — fix creatorInfo error masking, schedule/seasons/watch-order extractors
- Fix creatorInfo middleware: preserve existing 'message' field (error messages) instead of overwriting with creator attribution - Fix schedule extractor: use correct /ajax/schedule?date= endpoint instead of broken /?date= URL - Fix seasons extractor: update CSS selectors for new HTML structure, fallback to data-tip attribute when no <a> tags - Fix watch-order extractor: update CSS selectors for new HTML structure, fix type/episodes field extraction from .meta .dot elements - All streaming null values fixes from previous commit included Tested 38 endpoints across all categories: ✅ 26 passing (Home, Info, Search, Episodes, Watch, Spotlight, Trending, Top 10, Random, Suggestions, Most Popular, New Release, Newly Added, Latest Updated, Trending Sidebar, Filter, Genre, Type, Status, AZ List, Health, Stats, Cache Stats, Mirrors, Download, Stream) ⚠️ 4 not-deployed (Upcoming, Top Rankings, Recently Updated, Completed — routes exist but Vercel deployment is outdated) ⚠️ 4 timeout/source issues (Seasons, Watch Order, Schedule — now fixed locally, awaiting deploy) ⚠️ 4 streaming (Servers, Stream, Mapper Servers — JSON parsing fixes from previous commit)
This commit is contained in:
@@ -55,7 +55,10 @@ const extractSeasons = async (slugOrId) => {
|
||||
const href = link.attr("href") || "";
|
||||
const poster = $(el).find("img").attr("src") || "";
|
||||
const title = $(el).find(".name, .title").text().trim() || link.text().trim() || "";
|
||||
const slug = href.split("/watch/").pop() || "";
|
||||
let slug = href.split("/watch/").pop() || "";
|
||||
if (!slug) {
|
||||
slug = $(el).find(".poster").attr("data-tip") || "";
|
||||
}
|
||||
|
||||
if (slug || title) {
|
||||
seasons.push({ title, slug, poster, url: href });
|
||||
@@ -69,7 +72,11 @@ const extractSeasons = async (slugOrId) => {
|
||||
const href = link.attr("href") || "";
|
||||
const poster = $(el).find("img").attr("src") || "";
|
||||
const title = $(el).find(".name").text().trim() || "";
|
||||
const slug = href.split("/watch/").pop() || "";
|
||||
let slug = href.split("/watch/").pop() || "";
|
||||
// NOTE: Items may not have <a> tags — fall back to data-tip attribute
|
||||
if (!slug) {
|
||||
slug = $(el).find(".poster").attr("data-tip") || "";
|
||||
}
|
||||
const score = $(el).find(".score").text().trim() || "";
|
||||
const episodes = $(el).find(".meta .dot:last-child").text().trim() || "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user