1
私はlibtorrentを使用していくつかのトレントをマグネットに変換しようとしています。Libtorrentトレント - >
私はpythonで私はC++
torrent_info ti(current_file.c_str(), ec);
printf("magnet:?xt=urn:btih:%s&dn=%s\n", ti.info_hash().to_string().c_str(), ti.name().c_str());
に次のことを試してみたが、結果は適切な文字列ではありません(バイナリ)とすることはできません
info = libtorrent.torrent_info(sys.argv[1])
print "magnet:?xt=urn:btih:%s&dn=%s" % (info.info_hash(), info.name())
を使用することができることを読みました結果を使用します。
誰かがトレントのハッシュを印刷できるものに変換する方法を知っていますか?
ありがとうございます。