Files
RSSHub/lib/routes/theinitium/follow.ts
T
Peng GuanwenandTony cf4f2d21a8 fix(route/theinitium): Fix metadata & token expiration (#15444)
* fix(route/theinitium): Fix metadata & token expiration

* Update full.ts

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* fix: split theinitium

---------
2024-05-03 05:23:38 +08:00

49 lines
2.4 KiB
TypeScript

import { Route } from '@/types';
import { processFeed } from './utils';
const handler = (ctx) => processFeed('follow', ctx);
export const route: Route = {
path: '/follow/articles/:language?',
name: '个人订阅追踪动态',
maintainers: ['AgFlore'],
parameters: {
language: '语言,简体`zh-hans`,繁体`zh-hant`,缺省为简体',
},
radar: [
{
title: '作者',
source: ['theinitium.com/author/:type'],
target: '/author/:type',
},
],
handler,
example: '/theinitium/author/ninghuilulu/zh-hans',
categories: ['new-media'],
description: 'Web 版认证 token 和 iOS 内购回执认证 token 只需选择其一填入即可。你也可选择直接在环境设置中填写明文的用户名和密码',
features: {
requireConfig: [
{
name: 'INITIUM_BEARER_TOKEN',
optional: true,
description: `端传媒 Web 版认证 token。获取方式:登陆后打开端传媒站内任意页面,打开浏览器开发者工具中 “网络”(Network) 选项卡,筛选 URL 找到任一个地址为 \`api.initium.com\` 开头的请求,点击检查其 “消息头”,在 “请求头” 中找到Authorization字段,将其值复制填入配置即可。你的配置应该形如 \`INITIUM_BEARER_TOKEN: 'Bearer eyJxxxx......xx_U8'\`。使用 token 部署的好处是避免占据登陆设备数的额度,但这个 token 一般有效期为两周,因此只可作临时测试使用。`,
},
{
name: 'INITIUM_IAP_RECEIPT',
optional: true,
description: `端传媒 iOS 版内购回执认证 token。获取方式:登陆后打开端传媒 iOS app 内任意页面,打开抓包工具,筛选 URL 找到任一个地址为 \`api.initium.com\` 开头的请求,点击检查其 “消息头”,在 “请求头” 中找到 \`X-IAP-Receipt\` 字段,将其值复制填入配置即可。你的配置应该形如 \`INITIUM_IAP_RECEIPT: ef81dee9e4e2fe084a0af1ea82da2f7b16e75f756db321618a119fa62b52550e\`。`,
},
{
name: 'INITIUM_USERNAME',
optional: true,
description: `端传媒用户名 (邮箱)`,
},
{
name: 'INITIUM_PASSWORD',
optional: true,
description: `端传媒密码`,
},
],
},
};