@@ -3,8 +3,9 @@ const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const keyword = ctx.params.keyword;
|
||||
const api_url = `https://sspai.com/api/v1/articles?offset=0&limit=50&has_tag=1&tag=${keyword}&include_total=false`;
|
||||
const host = `https://beta.sspai.com/tag/${keyword}`;
|
||||
const keyword_encode = encodeURIComponent(keyword);
|
||||
const api_url = `https://sspai.com/api/v1/articles?offset=0&limit=50&has_tag=1&tag=${keyword_encode}&include_total=false`;
|
||||
const host = `https://beta.sspai.com/tag/${keyword_encode}`;
|
||||
const resp = await got({
|
||||
method: 'get',
|
||||
url: api_url,
|
||||
|
||||
Reference in New Issue
Block a user