fix: update version to 1.17 in manifest.json and improve meta and posts data extraction logic

This commit is contained in:
Himanshu
2026-02-23 20:49:06 +05:30
parent 316f4c7e0c
commit 099b4aba4f
5 changed files with 117 additions and 35 deletions

View File

@@ -72,7 +72,7 @@ async function posts(
signal: AbortSignal,
headers: Record<string, string> = {},
axios: ProviderContext["axios"],
cheerio: ProviderContext["cheerio"]
cheerio: ProviderContext["cheerio"],
): Promise<Post[]> {
try {
const urlRes = await fetch(url, {
@@ -84,8 +84,8 @@ async function posts(
});
const $ = cheerio.load(await urlRes.text());
const posts: Post[] = [];
$(".blog-items,.post-list,#archive-container")
?.children("article,.entry-list-item")
$(".blog-items,.post-list,#archive-container,.movies-grid")
?.children("article,.entry-list-item,a")
?.each((index, element) => {
const post = {
title: (
@@ -99,7 +99,10 @@ async function posts(
""
).trim(),
link: $(element)?.find("a")?.attr("href") || "",
link:
$(element)?.find("a")?.attr("href") ||
$(element)?.attr("href") ||
"",
image:
$(element).find("a").find("img").attr("data-lazy-src") ||
$(element).find("a").find("img").attr("data-src") ||