josephsalisbury / python-bittorrent Goto Github PK
View Code? Open in Web Editor NEWA simple, clean, and efficient BitTorrent library, written entirely in Python.
A simple, clean, and efficient BitTorrent library, written entirely in Python.
Hi, I want to use this library, But I literally have no idea how it works. How does this library create torrent files?
In bencode.py, decode_str() you have first condition like:
try:
colon = data.find(":")
So, if you have a string like: "4test", you have to be failed.
raise URLError('unknown url type: %s' % type)
urllib2.URLError: urlopen error unknown url type: udp
getting this error when trying to download torrent
bencode.decode(data) fails with data from some .torrent files like:
Traceback (most recent call last):
File "H:\Programmation\Deluge\test_decode.py", line 18, in
dic = bencode.decode(data)
File "python-bittorrent/bencode.py", line 286, in decode
return decode_functionsben_type(data)
File "python-bittorrent/bencode.py", line 252, in decode_dict
terms = inflate(data)
File "python-bittorrent/bencode.py", line 85, in inflate
xs = inflate(exp[strlength:])
File "python-bittorrent/bencode.py", line 85, in inflate
xs = inflate(exp[strlength:])
File "python-bittorrent/bencode.py", line 85, in inflate
xs = inflate(exp[strlength:])
File "python-bittorrent/bencode.py", line 85, in inflate
xs = inflate(exp[strlength:])
File "python-bittorrent/bencode.py", line 85, in inflate
xs = inflate(exp[strlength:])
File "python-bittorrent/bencode.py", line 85, in inflate
xs = inflate(exp[strlength:])
File "python-bittorrent/bencode.py", line 85, in inflate
xs = inflate(exp[strlength:])
File "python-bittorrent/bencode.py", line 77, in inflate
xs = inflate(exp[end + 1:])
File "python-bittorrent/bencode.py", line 85, in inflate
xs = inflate(exp[strlength:])
File "python-bittorrent/bencode.py", line 91, in inflate
end = walk(exp) # Find the end of the data type
File "python-bittorrent/bencode.py", line 49, in walk
return walk(exp, index + strlength)
File "python-bittorrent/bencode.py", line 55, in walk
return walk(exp, index + endsub)
File "python-bittorrent/bencode.py", line 49, in walk
return walk(exp, index + strlength)
File "python-bittorrent/bencode.py", line 49, in walk
return walk(exp, index + strlength)
File "python-bittorrent/bencode.py", line 49, in walk
return walk(exp, index + strlength)
File "python-bittorrent/bencode.py", line 43, in walk
return walk(exp, endchar + 1)
File "python-bittorrent/bencode.py", line 49, in walk
return walk(exp, index + strlength)
File "python-bittorrent/bencode.py", line 49, in walk
return walk(exp, index + strlength)
File "python-bittorrent/bencode.py", line 40, in walk
if exp[index] == "i":
IndexError: string index out of range
Hi,
I can see the handshake code, but couldn't find routines to download pieces. Could you confirm this code doesn't support actually downloading data over BitTorrent?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.