feat: add douban url, optimize source aggregate

This commit is contained in:
shinya
2025-07-01 22:41:30 +08:00
parent 31069691ef
commit b732e9a3d4
12 changed files with 177 additions and 9 deletions

View File

@@ -19,6 +19,7 @@ interface ApiSearchItem {
vod_class?: string;
vod_year?: string;
vod_content?: string;
vod_douban_id?: number;
type_name?: string;
}
@@ -48,7 +49,6 @@ async function searchFromApi(
}
const data = await response.json();
if (
!data ||
!data.list ||
@@ -92,6 +92,7 @@ async function searchFromApi(
year: item.vod_year ? item.vod_year.match(/\d{4}/)?.[0] || '' : '',
desc: cleanHtmlTags(item.vod_content || ''),
type_name: item.type_name,
douban_id: item.vod_douban_id,
};
});
@@ -161,6 +162,7 @@ async function searchFromApi(
: '',
desc: cleanHtmlTags(item.vod_content || ''),
type_name: item.type_name,
douban_id: item.vod_douban_id,
};
});
} catch (error) {