Skip to content

Conversation

@chain710
Copy link
Contributor

fix #20

introduce a new Site impl: mtorrent.Site, which is able to

  1. search torrents
  2. get user profile
  3. get torrent's real download url

我个人只使用brush命令,GetAllTorrents暂未实现

@chain710
Copy link
Contributor Author

Updated: api doc https://test2.m-team.cc/api/doc.html#/home

第三方工具請使用 API Access Token 訪問資料介面:可通过【控制台->實驗室->存取令牌】自助获取
http請求頭中通過:x-api-key傳遞

@yjiawqgj
Copy link

https://test2.m-team.cc/api/doc.html#/home
Can't open it and I don't understand how to do it. Can you elaborate?

@chain710
Copy link
Contributor Author

https://test2.m-team.cc/api/doc.html#/home Can't open it and I don't understand how to do it. Can you elaborate?

Program: just put x-api-key in http header

config example:

[[sites]]
name = 'mteam'
type = 'mteam'
httpHeaders = [["x-api-key", "yourkey"]]
.....

@yjiawqgj
Copy link

chrome_PSTTy64Lp7
is that so?

@chain710
Copy link
Contributor Author

  • search torrents

这里是ptool工具的PR,不是jackkett的

@sagan
Copy link
Owner

sagan commented Mar 25, 2024

感谢提供 mteam 新版程序的实现。

看了下有几个小问题。

  • torrent 的 IsActive 字段 true 含义是“当前用户曾经下载过或正在下载该种子”。和种子是否是死种无关。如果 API 无法获取该信息,那么保留默认的 false。
  • torrent 的 Id 应该是 "mteam.12345" 格式,附加上站点 id 前缀。

@yjiawqgj
Copy link

  • search torrents

这里是ptool工具的PR,不是jackkett的

实在不知道怎么用呀。给个截图演示吧!

@chain710
Copy link
Contributor Author

感谢提供 mteam 新版程序的实现。

看了下有几个小问题。

  • torrent 的 IsActive 字段 true 含义是“当前用户曾经下载过或正在下载该种子”。和种子是否是死种无关。如果 API 无法获取该信息,那么保留默认的 false。
  • torrent 的 Id 应该是 "mteam.12345" 格式,附加上站点 id 前缀。

了解,我晚点调整一下

btw: GetAllTorrents的语义是什么,抓取站内所有torrents吗,一般在那里使用(如何测试)?
可以晚点提供一个简单的实现

@sagan
Copy link
Owner

sagan commented Mar 25, 2024

batchdl 命令使用 GetAllTorrents,就是一页页爬取 baseUrl (np 默认 torrents.php) 的种子,返回本页的种子和下一页页码。这个是我当电子书战士时用的,也用来在站免时下整站。

@chain710 chain710 force-pushed the feat/mteam202403 branch 4 times, most recently from b1c5712 to 3bfa3bc Compare March 25, 2024 14:33
@chain710
Copy link
Contributor Author

感谢提供 mteam 新版程序的实现。

看了下有几个小问题。

  • torrent 的 IsActive 字段 true 含义是“当前用户曾经下载过或正在下载该种子”。和种子是否是死种无关。如果 API 无法获取该信息,那么保留默认的 false。
  • torrent 的 Id 应该是 "mteam.12345" 格式,附加上站点 id 前缀。

已调整

introduce a new Site impl: mtorrent.Site, which is able to
1. search torrents
2. get user profile
3. get torrent's real download url

usage: specify x-api-key in httpHeaders
@sagan sagan merged commit dff7946 into sagan:master Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mteam brush error: failed to fetch url: status=404

3 participants