Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nHentai 增加 bt 支持 #2128

Closed
Byhaise opened this issue May 14, 2019 · 8 comments · Fixed by #3926
Closed

nHentai 增加 bt 支持 #2128

Byhaise opened this issue May 14, 2019 · 8 comments · Fixed by #3926
Labels
RSS enhancement New feature or request to existing RSS

Comments

@Byhaise
Copy link

Byhaise commented May 14, 2019

路由如 nhentai/language/chinese

这是一个什么样的功能?

为 nHentai 增加 bt 支持

这个功能可以解决什么问题?

支持直接在bt软件内订阅和自动下载 nHentai内容

额外描述

网页内有 .torrent 链接可以抓取
(Ps 官方 demo 的 nhentai 路由好像已经挂了

@DIYgod DIYgod added the RSS enhancement New feature or request to existing RSS label May 14, 2019
@junfengP
Copy link
Contributor

junfengP commented Jun 6, 2019

网页里面 Download按钮是跳转到另一个链接,进而下载torrent文件。 下载需要登陆,好在没有验证码,可以仿pixiv路由,但是怎么下文件和转种子成磁力,我不会。

@ghost ghost mentioned this issue Jun 14, 2019
@junfengP
Copy link
Contributor

junfengP commented Feb 7, 2020

找到解决方案了,种子解析的库:parse-torrent github
但是我的辣鸡迅雷下不动啊,国外的vps搭的aria2倒是可以下的动

@hoilc
Copy link
Contributor

hoilc commented Feb 7, 2020

@junfengP 不太明白 这个项目看起来是解析torrent的 前提不还是要拿到磁链或种子吗?

@junfengP
Copy link
Contributor

junfengP commented Feb 7, 2020

@junfengP 不太明白 这个项目看起来是解析torrent的 前提不还是要拿到磁链或种子吗?

登录后,页面内存有种子文件的下载地址,该种子文件需要登录才可以下载。

理论思路:

  1. 通过环境变量获取登录后的cookie (有效期约1个月) 或 通过环境变量获取 账号密码 模拟登录(无验证码,但是有csrfmiddlewaretoken在登录页面可以获取)。
  2. 抓取页面元素时,也抓取种子文件链接
  3. 通过HTTP请求下载该种子文件至内存中
  4. 通过parse-torrent解析该种子并转换成磁力链
  5. item内填上磁力链

@yefoenix
Copy link
Contributor

yefoenix commented Feb 7, 2020

不需要这么复杂
enclosure url 也可以是种子的 http 链接,做到 第二步就像了,三四都可以不要

@junfengP
Copy link
Contributor

junfengP commented Feb 7, 2020

不需要这么复杂
enclosure url 也可以是种子的 http 链接,做到 第二步就像了,三四都可以不要

实测,未登录下载不了种子

@yefoenix
Copy link
Contributor

yefoenix commented Feb 7, 2020

@junfengP 这是个问题,我只是提示一下不需要把种子下载下来转换成 magnet 链接

@hoilc
Copy link
Contributor

hoilc commented Feb 8, 2020

  • 通过环境变量获取登录后的cookie (有效期约1个月) 或 通过环境变量获取 账号密码 模拟登录(无验证码,但是有csrfmiddlewaretoken在登录页面可以获取)。

完事😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RSS enhancement New feature or request to existing RSS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants