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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

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) {

0
lib/routes/cneb/guoneinews.js Normal file → Executable file
View File