mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 14:40:23 +08:00
26 lines
698 B
JavaScript
26 lines
698 B
JavaScript
const got = require('@/utils/got');
|
|
|
|
module.exports = async (ctx) => {
|
|
const response = await got({
|
|
method: 'get',
|
|
baseUrl: 'https://cn.bing.com',
|
|
url: '/HPImageArchive.aspx',
|
|
params: {
|
|
format: 'js',
|
|
idx: 0,
|
|
n: 7,
|
|
mkt: 'zh-CN',
|
|
},
|
|
});
|
|
const data = response.data;
|
|
ctx.state.data = {
|
|
title: 'Bing每日壁纸',
|
|
link: `https://cn.bing.com/`,
|
|
item: data.images.map((item) => ({
|
|
title: item.copyright,
|
|
description: `<img referrerpolicy="no-referrer" src="https://cn.bing.com${item.url}">`,
|
|
link: item.copyrightlink,
|
|
})),
|
|
};
|
|
};
|