修改 README

This commit is contained in:
jjeejj 2018-05-08 20:53:37 +08:00
parent 69a8870230
commit fe69a3055a
2 changed files with 2 additions and 3 deletions

View File

@ -516,7 +516,7 @@ key: 产品密钥
### 独家号
举例: [https://rss.now.sh/toutiao/user/:id](https://rss.now.sh/toutiao/user/:id)
举例: [https://rss.now.sh/toutiao/user/140544](https://rss.now.sh/toutiao/user/140544)
路由: `/toutiao/user/:id`

View File

@ -4,10 +4,9 @@ const cheerio = require('cheerio');
const config = require('../../config');
const baseUrl = 'https://toutiao.io';
let requestUrl = `${baseUrl}/subjects/userID?f=new`
module.exports = async (ctx)=>{
const id = ctx.params.id;
requestUrl = requestUrl.replace('userID',id);
let requestUrl = `${baseUrl}/subjects/${id}?f=new`;
const response = await axios({
method:'get',
url:requestUrl,