v2e233
V2EX  ›  问与答

不使用 torrent 下载软件解析.torrent 文件 如何获得.torrent 内文件名

  •  
  •   v2e233 · May 25, 2018 · 2641 views
    This topic created in 2914 days ago, the information mentioned may be changed or developed.

    只想要文件名 不想下载 有什么办法么 直接把 torrent 改 txt 是不行的。。。

    7 replies    2018-05-26 00:36:30 +08:00
    bzq2810
        1
    bzq2810  
       May 25, 2018 via iPhone
    那就用 torrent 编辑软件
    donyee
        2
    donyee  
       May 25, 2018
    torrent 应该是一个 hash 数据,下载软件用这个 hash 值去 p2p 服务器查询得到文件名的
    Mutoo
        3
    Mutoo  
       May 25, 2018   ❤️ 1
    v2e233
        4
    v2e233  
    OP
       May 25, 2018
    @Mutoo @bzq2810 @donyee 感谢各位大佬 我去试试
    7sDream
        5
    7sDream  
       May 25, 2018
    @Mutoo 感谢你的推荐,让我在巨大的羞愧心里下跑去更新了一下 0.2.0 版本,加了写回 torrent file 的功能

    @v2e233 如果用的时候有啥问题也欢迎提 Issue 反馈(有没有时间改就是另一回事了 233 )
    julyclyde
        6
    julyclyde  
       May 25, 2018
    @donyee 你说的那叫 magnet
    msg7086
        7
    msg7086  
       May 26, 2018
    @julyclyde @donyee
    而且 BT 服务器上也不会存文件名。

    @v2e233 torrent 是个序列化的字符串,找 bencode 解序列化出来就是个关联数组了。
    bencode 很容易把程序写出来,以前用 PHP 手撸过,不难。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3040 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 09:00 · PVG 17:00 · LAX 02:00 · JFK 05:00
    ♥ Do have faith in what you're doing.