feat(route): 为 E 站增加 star cookie (#10607)
This commit is contained in:
@@ -607,6 +607,7 @@ See docs of the specified route and `lib/config.js` for detailed information.
|
||||
- `EH_IPB_MEMBER_ID`: The value of `ipb_member_id` in the cookie header after logging in E-Hentai
|
||||
- `EH_IPB_PASS_HASH`: The value of `ipb_pass_hash` in the cookie header after logging in E-Hentai
|
||||
- `EH_SK`: The value of `sk` in the cookie header after logging in E-Hentai
|
||||
- `EH_STAR`: The value of `star` in the cookie header if your account has stars. If this value is set, image limit allocation will links to the account rather than IP address
|
||||
- `EH_IGNEOUS`: The value of `igneous` in the cookie header after logging in ExHentai. If this value is set, RSS will be generated from ExHentai
|
||||
- `EH_IMG_PROXY`: Cover proxy address. If this is set, the link to the cover image will be replaced with this value at the beginning. When using ExHentai, the cover image requires cookies to access it, so you can use this with a cookie-added proxy server to access the cover image without cookies in some readers.
|
||||
|
||||
|
||||
@@ -641,6 +641,7 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行
|
||||
- `EH_IPB_PASS_HASH`: E-Hentai 账户登录后 cookie 的 `ipb_pass_hash` 值
|
||||
- `EH_SK`: E-Hentai 账户登录后 cookie 中的`sk`值
|
||||
- `EH_IGNEOUS`: ExHentai 账户登录后 cookie 中的`igneous`值。若设置此值,RSS 数据将全部从里站获取
|
||||
- `EH_STAR`: E-Hentai 账户获得捐赠等级后将出现该 cookie。若设置此值,图片访问量限制将与账号关联而非 IP 地址
|
||||
- `EH_IMG_PROXY`: 封面代理访问地址。若设置此值,封面图链接将被替换为以此值开头。使用 ExHentai 时,封面图需要有 Cookie 才能访问,在一些阅读软件上没法显示封面,可以使用此值搭配一个加 Cookie 的代理服务器实现阅读软件无 Cookie 获取封面图。
|
||||
|
||||
- Gitee 全部路由:[申请地址](https://gitee.com/api/v5/swagger)
|
||||
|
||||
@@ -134,6 +134,7 @@ const calculateValue = () => {
|
||||
ipb_pass_hash: envs.EH_IPB_PASS_HASH,
|
||||
sk: envs.EH_SK,
|
||||
igneous: envs.EH_IGNEOUS,
|
||||
star: envs.EH_STAR,
|
||||
img_proxy: envs.EH_IMG_PROXY,
|
||||
},
|
||||
email: {
|
||||
|
||||
@@ -17,6 +17,10 @@ if (has_cookie) {
|
||||
}
|
||||
}
|
||||
|
||||
if (config.star) {
|
||||
headers.cookie += `;star=${config.star}`;
|
||||
}
|
||||
|
||||
function ehgot(url) {
|
||||
if (from_ex) {
|
||||
return got({ method: 'get', url: `https://exhentai.org/${url}`, headers });
|
||||
|
||||
Reference in New Issue
Block a user