fix: Fix blow studio 不能访问 (#4697)

This commit is contained in:
MisteryMonster
2020-05-09 11:55:01 +08:00
committed by GitHub
parent 8d40c69392
commit 2945d75958
2 changed files with 2 additions and 2 deletions
+2 -2
View File
@@ -4,14 +4,14 @@ const cheerio = require('cheerio');
module.exports = async (ctx) => {
const response = await got({
method: 'get',
url: `http://blowstudio.es/work`,
url: `https://www.blowstudio.es/work/`,
});
const data = response.data;
const $ = cheerio.load(data); // 使用 cheerio 加载返回的 HTML
const list = $('.portfolios.normal > ul > li').get().slice(0, 10);
const articledata = await Promise.all(
list.map(async (item) => {
const link = `https://www.blowstudio.es${$(item).find('a').attr('href')}`;
const link = `https://www.blowstudio.es${$(item).find('a').attr('href')}/`;
const cache = await ctx.cache.get(link);
if (cache) {
Regular → Executable
View File