mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 10:55:10 +00:00
fix: update extractors to match actual anikototv.to structure
- Analyzed actual HTML structure of anikototv.to - Updated all extractors with correct CSS selectors - Changed ID-based to slug-based lookups - Updated URL patterns to match actual website - Fixed stream info to use AJAX server list - Improved error handling
This commit is contained in:
@@ -11,15 +11,13 @@ const extractSuggestions = async (keyword) => {
|
||||
|
||||
const suggestions = [];
|
||||
$(".search-suggest .film-detail, .nav-item a").each((i, el) => {
|
||||
const id = $(el).attr("href")?.split("/").pop() || "";
|
||||
const slug = $(el).attr("href")?.split("/watch/").pop() || "";
|
||||
const poster = $(el).find("img").attr("src") || "";
|
||||
const title = $(el).find(".film-name, .dynamic-name").text().trim() || "";
|
||||
const japaneseTitle = $(el).find(".fd-infor .fdi-item:first-child").text().trim() || "";
|
||||
const showType = $(el).find(".fdi-item:first-child").text().trim() || "";
|
||||
const releaseDate = $(el).find(".fdi-item:nth-child(2)").text().trim() || "";
|
||||
const title = $(el).find(".film-name, .name").text().trim() || "";
|
||||
const type = $(el).find(".fdi-item:first-child").text().trim() || "";
|
||||
|
||||
if (id) {
|
||||
suggestions.push({ id, poster, title, japaneseTitle, showType, releaseDate });
|
||||
if (slug) {
|
||||
suggestions.push({ slug, poster, title, type });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user