Comments (6)
Just write a test using the file you provide, it's the same in this case.
PS: hash_raw=True
must be provided to (try my best to) ensure result of encoding is as same as origin data.
from torrent_parser.
Please provide a torrent file that make you have this issue, for testing purposes.
And the mean of "info Hash v1" is not clear, some screenshot or log of transmission-show
maybe helpful.
from torrent_parser.
This is the output of transmission-show, The "Hash" value is also referred to as "Info Hash v1" on qbittorrent. It is the "Hash" value that I am trying to get from pytp.
Name: xubuntu-22.04-desktop-amd64.iso
File: xubuntu-22.04-desktop-amd64.iso.torrent
GENERAL
Name: xubuntu-22.04-desktop-amd64.iso
Hash: f435d2324f313bad7ff941633320fe4d1c9c3079
Created by: mktorrent 1.1
Created on: Thu Apr 21 04:02:51 2022
Comment: Xubuntu CD cdimage.ubuntu.com
Piece Count: 10306
Piece Size: 256.0 KiB
Total Size: 2.70 GB
Privacy: Public torrent
TRACKERS
Tier #1
https://torrent.ubuntu.com/announce
FILES
xubuntu-22.04-desktop-amd64.iso (2.70 GB)
This is a snippet of the pytp output as the original is ~400KB.
{"announce": "https://torrent.ubuntu.com/announce", "comment": "Xubuntu CD cdima
ge.ubuntu.com", "created by": "mktorrent 1.1", "creation date": 1650549771, "inf
o": {"length": 2701512704, "name": "xubuntu-22.04-desktop-amd64.iso", "piece len
gth": 262144, "pieces": ["8cadae7758f70a8ea1436eeb0f5652a98490b403", "0b303e6617
e84c37edbe52d7a82e5a7533bfcdce", "6b239e36ba8a4301f36383613ecb064e489b9990", "36
bf90f9dce84508628fb4aab9dd5ca7abe950d8", "24a44ee3ea3ca316ef5e9323e3fce4045e7d1f
84", "5e621209bef519529508d24ad5fddf549a32422c", "d641c2d4e07713490747f22fb76aea
206e319c03", "42101ebbb4feaa44b6ff24c63942f770d0510136", "49e648f3bf657adb65c6fd
38ecf870f5118af104", "6077160ac9752477d702c38a125b2d1684da85da", "2002f583676a15
dfd2232dd1fc48c6013a26f080", "286ce9b025c646badf3d8264617d1b5343702458", "772268
df32e9078d1ba9fe38ebb2823ec1b64b49", "74a91f948242eafa56380ec85b6ab5b66ed44d21"
The link to the torrent file is: https://torrent.ubuntu.com/xubuntu/releases/jammy/release/desktop/xubuntu-22.04-desktop-amd64.iso.torrent
Thank you for your assistance.
from torrent_parser.
I did some digging in tramsmission source code, and found info hash is actually a SHA1 checksum of torrent file's info object binary bytes.
This value is not stored in files itself, but be caluclated during parse process, so current this project do not show it.
The only way I can see is after parse the file, we encode the info object into binary bytes again and calulate the hash, It (in theory) will be the same value as transmission-show
shows.
from torrent_parser.
Thank you. I'll use transmission-show for now.
from torrent_parser.
That's OK, this project is basicly a torrent format encoder/decoder, use transmission-show
is more reasonable if you want features more than that.
But I think we can build our own transmission-show
like tools above this project, the only obstacle is that I don't have enough time. 😭
from torrent_parser.
Related Issues (12)
- UnicodeDecodeError: 'utf8' codec can't decode byte 0xb5 in position 1: invalid start byte HOT 4
- Changing trackers in announce-list corrupts save HOT 7
- Missing dependency typing_extensions HOT 3
- add functions to calculate v1 and v2 info hashes of torrent files HOT 3
- Python2.7 处理不存在的文件时出现 NameError: global name 'FileNotFoundError' is not defined HOT 1
- hello,I find something wrong in you code.. HOT 4
- UnicodeDecodeError HOT 7
- Same error with every torrent. HOT 2
- Web siders are sorted by length, but not by name. HOT 5
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 43 HOT 2
- v2 Torrent supported? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torrent_parser.