This commit is contained in:
@@ -3,13 +3,13 @@ async function searchResults(keyword) {
|
|||||||
const response = await fetchv2(`https://www.dora-video.cn/search/${keyword}/`);
|
const response = await fetchv2(`https://www.dora-video.cn/search/${keyword}/`);
|
||||||
const html = await response.text();
|
const html = await response.text();
|
||||||
|
|
||||||
const regex = /<div class="card-img-bili">.*?<a href="(.*?)">.*?data-url="(.*?)".*?<span class="title">(.*?)<\/span>/gs;
|
const regex = /<div class="card-img-bili">.*?<a href="(.*?)">.*?<img[^>]+data-url="(.*?)"[^>]*>.*?<span class="title">(.*?)<\/span>/gs;
|
||||||
|
|
||||||
let match;
|
let match;
|
||||||
while ((match = regex.exec(html)) !== null) {
|
while ((match = regex.exec(html)) !== null) {
|
||||||
results.push({
|
results.push({
|
||||||
title: (match[3] || "").trim().replace(/<font color="red">a<\/font>|<font color="red">|<\/font>/g, " "),
|
title: (match[3] || "").trim().replace(/<font color="red">a<\/font>|<font color="red">|<\/font>/g, " "),
|
||||||
image: "https://i.ibb.co/ds7r6YJy/Search-has-no-images.png",
|
image: match[2].trim(),
|
||||||
href: match[1].trim()
|
href: match[1].trim()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user