style: auto format

This commit is contained in:
github-actions[bot]
2024-11-27 17:31:58 +00:00
parent f59d7dae2b
commit cc7062d697
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -74,11 +74,11 @@ async function handler(ctx) {
cache.tryGet(item.link, async () => {
const detailResponse = await got({
method: 'get',
url: item.link
url: item.link,
}); // 获取详情页内容
const content = load(detailResponse.data); // 使用cheerio解析内容
item.description = content('#vsb_content_2 .v_news_content').html() || '内容无法提取';// 提取内容区详情
item.description = content('#vsb_content_2 .v_news_content').html() || '内容无法提取'; // 提取内容区详情
return item; // 返回完整的item
})
+3 -3
View File
@@ -77,7 +77,8 @@ async function handler(ctx) {
cache.tryGet(item.link, async () => {
const url = new URL(item.link); // 创建 URL 对象以验证链接
// 确保链接是以正确的域名开头,并且不为空
if (url.hostname === 'gs1.shu.edu.cn') { // 需校内访问
if (url.hostname === 'gs1.shu.edu.cn') {
// 需校内访问
// Skip or handle differently for URLs with gs1.shu.edu.cn domain
item.description = 'gs1.shu.edu.cn, 无法直接获取';
return item;
@@ -85,13 +86,12 @@ async function handler(ctx) {
const detailResponse = await got({
method: 'get',
url: item.link
url: item.link,
}); // 获取详情页内容
const content = load(detailResponse.data); // 使用cheerio解析内容
item.description = content('#vsb_content .v_news_content').html() || item.description;
return item; // 返回完整的item
})
)
+1 -1
View File
@@ -74,7 +74,7 @@ async function handler(ctx) {
cache.tryGet(item.link, async () => {
const detailResponse = await got({
method: 'get',
url: item.link
url: item.link,
});
const content = load(detailResponse.data);
+1 -1
View File
@@ -78,7 +78,7 @@ async function handler(ctx) {
cache.tryGet(item.link, async () => {
const detailResponse = await got({
method: 'get',
url: item.link
url: item.link,
}); // 获取详情页内容
const content = load(detailResponse.data); // 使用cheerio解析内容