From b1438fb765cdb92f0143eb91462584caf182a925 Mon Sep 17 00:00:00 2001 From: 1813927768 Date: Tue, 2 Jun 2020 11:50:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=87=A4=E5=87=B0=E7=BD=91-=E5=A4=A7?= =?UTF-8?q?=E9=A3=8E=E5=8F=B7api=E6=9B=B4=E6=96=B0=20(#4893)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/reading.md | 12 ++++++++++++ lib/routes/ifeng/feng.js | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/reading.md b/docs/reading.md index b9212ad73..be85d4fce 100644 --- a/docs/reading.md +++ b/docs/reading.md @@ -279,3 +279,15 @@ count 的取值范围为 1-12,为防止请求次数过多,推荐设置为 5 ### 主页 + +## 生物谷 + +### 所有栏目 + + + +具体栏目编号,去网站上看标签 + +| 网址 | 对应路由 | +| -------- | -------- | +| http://news.bioon.com/biology | /shengwugu/biology | diff --git a/lib/routes/ifeng/feng.js b/lib/routes/ifeng/feng.js index d4deeddac..d2e54cd7a 100644 --- a/lib/routes/ifeng/feng.js +++ b/lib/routes/ifeng/feng.js @@ -10,14 +10,14 @@ module.exports = async (ctx) => { method: 'get', url: `https://shankapi.ifeng.com/winter/ishare/getAccountInfo/${id}`, headers: { - Referer: `https://ishare.ifeng.com/mediaShare/home/${id}/do`, + Referer: `https://feng.ifeng.com/author/${id}`, }, }); const contentResponse = await got({ method: 'get', - url: `https://shankapi.ifeng.com/winter/ishare/getShareListData/${id}/${type}/1`, + url: `https://shankapi.ifeng.com/winter/feng/author/getFengAuthorListData/${id}/${type}/1`, headers: { - Referer: `https://ishare.ifeng.com/mediaShare/home/${id}/do`, + Referer: `https://feng.ifeng.com/author/${id}`, }, }); @@ -27,7 +27,7 @@ module.exports = async (ctx) => { const mediaName = userData.weMediaName; const items = await Promise.all( (contentData || []).map(async (item) => { - const link = `https://feng.ifeng.com/c/${item.id}`; + const link = `https:${item.url}`; const simple = { title: item.title, description: `${item.title}`,