Преглед изворни кода

display torrent content util

master
Robin Thoni пре 8 година
родитељ
комит
d6b63d5695
1 измењених фајлова са 11 додато и 0 уклоњено
  1. 11
    0
      display-torrent.py

+ 11
- 0
display-torrent.py Прегледај датотеку

@@ -0,0 +1,11 @@
1
+#! /usr/bin/env python
2
+import sys
3
+import bencode
4
+
5
+torrentIn = sys.argv[1]
6
+
7
+with open(torrentIn, 'rb') as f:
8
+    bencoded = f.read()
9
+data = bencode.bdecode(bencoded)
10
+data['info']['pieces'] = []
11
+print(data)

Loading…
Откажи
Сачувај