From ed08072dcbc5389c2a61a8159861c68a9d04c914 Mon Sep 17 00:00:00 2001
From: aka paul <50n50@noreply.localhost>
Date: Wed, 17 Dec 2025 20:26:11 +0000
Subject: [PATCH] Update 1tamilcrow/1tamilcrow.js
---
1tamilcrow/1tamilcrow.js | 83 +++++++++++++++++++++++++---------------
1 file changed, 53 insertions(+), 30 deletions(-)
diff --git a/1tamilcrow/1tamilcrow.js b/1tamilcrow/1tamilcrow.js
index 857cfbb..6e059fe 100644
--- a/1tamilcrow/1tamilcrow.js
+++ b/1tamilcrow/1tamilcrow.js
@@ -1,27 +1,36 @@
async function searchResults(keyword) {
const results = [];
- const regex = /
]*>\s*([^<]+)\s*<\/a>/g;
+
+ const articleRegex = /
]*class="post-item[^"]*"[^>]*>([\s\S]*?)<\/article>/g;
+ const imageRegex = /
]*src="([^"]+)"[^>]*alt="([^"]*)"[^>]*>/;
+ const linkRegex = /]*class="post-listing-title"[^>]*href="([^"]+)"[^>]*title="[^"]*">([^<]+)<\/a>/;
try {
const response = await fetchv2("https://www.1tamilcrow.net/?s=" + keyword);
const html = await response.text();
-
+
let match;
- while ((match = regex.exec(html)) !== null) {
- results.push({
- href: match[2].trim(),
- title: decodeHtml(match[3].trim()),
- image: match[1] ? match[1].trim() : "No Image"
- });
- }
+ while ((match = articleRegex.exec(html)) !== null) {
+ const articleContent = match[1];
+
+ const imageMatch = imageRegex.exec(articleContent);
+ const image = imageMatch ? imageMatch[1].trim() : "No Image";
+
+
+ const linkMatch = linkRegex.exec(articleContent);
+ if (linkMatch) {
+ results.push({
+ href: linkMatch[1].trim(),
+ title: decodeHtml(linkMatch[2].trim()),
+ image: image
+ });
+ }
+ }
+
return JSON.stringify(results);
} catch (err) {
- return JSON.stringify([{
- title: "Error",
- image: "Error",
- href: "Error"
- }]);
+ return JSON.stringify([{ title: "Error", image: "Error", href: "Error" }]);
}
}
@@ -51,19 +60,27 @@ async function extractDetails(url) {
}]);
}
}
-
async function extractEpisodes(url) {
const results = [];
try {
const response = await fetchv2(url);
const html = await response.text();
- console.log(html);
- const regex = /