rss: use zhihu cookie to prevent being banned
This commit is contained in:
parent
7a8da68062
commit
c05208a39e
|
|
@ -36,4 +36,7 @@ module.exports = {
|
|||
github: {
|
||||
access_token: process.env.GITHUB_ACCESS_TOKEN,
|
||||
},
|
||||
zhihu: {
|
||||
cookie: process.env.ZHIHU_COOKIE,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ module.exports = async (ctx) => {
|
|||
Referer: `https://www.zhihu.com/people/${id}/activities`,
|
||||
authorization: 'oauth c3cef7c66a1843f8b3a9e6a1e3160e20',
|
||||
'X-API-VERSION': '3.0.40',
|
||||
cookie: config.zhihu.cookie,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ module.exports = async (ctx) => {
|
|||
Referer: `https://www.zhihu.com/people/${id}/answers`,
|
||||
authorization: 'oauth c3cef7c66a1843f8b3a9e6a1e3160e20',
|
||||
'X-API-VERSION': '3.0.40',
|
||||
cookie: config.zhihu.cookie,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ module.exports = async (ctx) => {
|
|||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://www.zhihu.com/collection/${id}`,
|
||||
cookie: config.zhihu.cookie,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ module.exports = async (ctx) => {
|
|||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://news-at.zhihu.com/api/4/news/latest',
|
||||
cookie: config.zhihu.cookie,
|
||||
},
|
||||
});
|
||||
// 根据api的说明,过滤掉极个别站外链接
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ module.exports = async (ctx) => {
|
|||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://zhuanlan.zhihu.com/${id}`,
|
||||
cookie: config.zhihu.cookie,
|
||||
},
|
||||
});
|
||||
const infoRes = await axios({
|
||||
|
|
|
|||
Loading…
Reference in New Issue