GithubHelp home page GithubHelp logo

bittornado's Introduction

BitTornado

BitTornado is a fork of the original Python BitTorrent distribution, made by John Hoffman to add some experimental features, most (if not all) of which are now standard in other clients and trackers. The last official release was made in 2006, and thus many newer features are missing, but BitTornado is also an accessible Python library, and has several simple tools for editing torrent files.

After several years of intermittent modifications, cleanups, modernization, and porting to Python 3.4, I have begun assigning version numbers. I have done my best to ensure that tagged versions and python-labelled branches (see below) work at least as well as they did in version 0.3.18. Since 0.4.0, the library components have been substantially reorganized, so expect dependent applications to break on upgrade.

Notice of unmaintained status

I appreciate that people have made an effort to use and report bugs in this package, which I believe is the most approachable implementation of many aspects of the protocol and file format. However, the BitTorrent ecosystem has moved on, and I don't have time to keep up with it.

At the time of this writing, in November 2018, it's been over two years since I was able to do more than briefly respond to an issue or review a small PR. This notice is less a decision and more an acknowledgment that I cannot devote any effort to maintaining this repository.

There are various known issues that are unresolved and will remain so unless somebody takes up maintenance.

Thanks to all who contributed time and effort on this.

Branches/Tags

Further development will be done in Python 3, although patches to the other branches may be accepted.

  • v0.3.18: Original import
  • legacy: Library structure unchanged, some fixes/cleanups made
  • python2.6: Python 2.6 compatibility maintained (legacy)
  • v0.4.0: Major restructuring, breaking depending applications
  • python2.7: Python 2.7 compatibility maintained (library structure updated)
  • master: Python 3

Using BitTornado Applications

Download or seed a file

A single file can be downloaded with any of the following commands:

btdownloadheadless.py myfile.torrent
btdownloadcurses.py myfile.torrent

A directory of files can be downloaded with any of the following commands:

btlaunchmany.py mydir
btlaunchmanycurses.py mydir

Attempting to download an already downloaded file will seed it.

Tracker

First, you need a tracker. If you're on a dynamic IP or otherwise unreliable connection, you should find someone else's tracker and use that. Otherwise, follow the rest of this step.

Trackers refer downloaders to each other. The load on the tracker is very small, so you only need one for all your files.

To run a tracker, execute the command bttrack.py Here is an example -

bttrack.py --port 6969 --dfile dstate

--dfile is where persistent information is kept on the tracker across invocations. It makes everything start working again immediately if you restart the tracker. A new one will be created if it doesn't exist already.

The tracker must be on a net-addressible box, and you must know the ip number or dns name of it.

The tracker outputs web logs to standard out. You can get information about the files it's currently serving by getting its index page.

Creating torrent files

btmakemetafile.py http://my.tracker:6969/announce myfile.ext

This will generate a file called myfile.ext.torrent

Make sure to include the port number in the tracker url if it isn't 80.

This command may take a while to scan over the whole file hashing it.

The /announce path is special and hard-coded into the tracker. Make sure to give the domain or ip your tracker is on instead of my.tracker.

You can use either a dns name or an IP address in the tracker url.

Creating many torrent files

btcompletedir.py http://my.tracker:6969/announce mydir

This will generate a torrent file for each file in mydir.

Editing torrent files

To view metadata encoded in the torrent file:

btshowmetainfo.py myfile.torrent

To set the announce tracker of a torrent file:

btreannounce.py http://mytracker.com:6969/announce myfile.torrent

To copy the announce information from one file to another:

btcopyannounce.py source.torrent destination.torrent

To set the default download name:

btrename.py myfile.torrent targetFileName.ext

To set HTTP seeds:

btsethttpseeds http://example.net/myfile myfile.torrent

To remove HTTP seeds:

btsethttpseeds 0 myfile.torrent

bittornado's People

Contributors

effigies avatar lowks avatar rconradharris avatar samhocevar avatar unit193 avatar weedy avatar zmedico avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bittornado's Issues

KeyError: 0

Before it crashed:

Traceback (most recent call last):
  File "/home/BitTornado/BitTornado/Network/RawServer.py", line 109, in listen_forever
    func()
  File "/home/BitTornado/BitTornado/Tracker/track.py", line 1117, in parse_allowed
    [".torrent"])
  File "/home/BitTornado/BitTornado/Application/parsedir.py", line 75, in parsedir
    for _, infohash in unchanged_files.values()}
  File "/home/BitTornado/BitTornado/Application/parsedir.py", line 75, in <dictcomp>
    for _, infohash in unchanged_files.values()}
KeyError: 0

and when starting:

Traceback (most recent call last):
  File "./bttrack.py", line 24, in <module>
    track(sys.argv[1:])
  File "/home/BitTornado/BitTornado/Tracker/track.py", line 1208, in track
    t = Tracker(config, r)
  File "/home/BitTornado/BitTornado/Tracker/track.py", line 415, in __init__
    self.parse_allowed()
  File "/home/BitTornado/BitTornado/Tracker/track.py", line 1117, in parse_allowed
    [".torrent"])
  File "/home/BitTornado/BitTornado/Application/parsedir.py", line 55, in parsedir
    for _, filehash in removed_files.values()}
  File "/home/BitTornado/BitTornado/Application/parsedir.py", line 55, in <dictcomp>
    for _, filehash in removed_files.values()}
KeyError: 0

Tracker isn't starting anymore.

AttributeError: 'NatCheck' object has no attribute 'bufferlen'

Got an error again, unrelated to the previous issue:

Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
self.sockethandler.handle_events(events)
File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 293, in handle_events
s.handler.data_came_in(s, data)
File "/home/BitTornado/BitTornado/Network/NatCheck.py", line 161, in data_came_in
self.read(s)
File "/home/BitTornado/BitTornado/Network/NatCheck.py", line 197, in _read
if self.bufferlen is not None:
AttributeError: 'NatCheck' object has no attribute 'bufferlen'

As of now, the Tracker hasn't crashed yet, so I don't see a problem with it... Just thought I'd mention it.

Edit: Okay the tracker crashes now by spamming the error into console. (to reproduce this error (for me at least); Put a torrent in the torrents directory and 'Update Trackers' on ruTorrent (not sure if it is also the case with other clients))

timeout exceeded

I am using python2.7 branch. And has 2 leech get file from seeder. They can download succeed,but after a period of time(may be half hour ), I found one of leech give the ERROR hint.

ERROR:
Problem connecting to tracker - timeout exceeded

ERROR:
Problem connecting to tracker - timeout exceeded

ERROR:
Problem connecting to tracker - timeout exceeded

saving: cent7.base (5930.0 MB)
percent done: 100
time left: Download Succeeded!
download to: /opt/yang/cent7.base
download rate:
upload rate: 0.0 kB/s
share rating: 0.535 (3157.7 MB up / 5905.0 MB down)
seed status: 1 seen recently, plus 0.000 distributed copies
peer status: 0 seen now, 0.0% done at 1310.3 kB/s

allow anonymous connections via i2p

In case you don't want to have what you share associated with your IP, you should have the option to anonymize. Yes, this comes at the cost of lower speeds, but the user would decide if it is worth enabling it. Nowadays, libtorrent and vuze already have that option.

Downloader doesn't work out of the box?

I have a repo that creates some virtual machines for testing this project.

# within the 'seeder' machine
vagrant@vagrant:~/murder$ python3 downloadtorrent.py ../200MB.zip.torrent
saving:         200MB.zip (200.0 MB)
percent done:   0.0
time left:
download to:    /home/vagrant/murder/200MB.zip
download rate:
upload rate:
share rating:
seed status:
peer status:
Traceback (most recent call last):
  File "downloadtorrent.py", line 221, in <module>
    run(sys.argv[1:])
  File "downloadtorrent.py", line 189, in run
    dow.startRerequester()
  File "/home/vagrant/murder/BitTornado/Client/download_bt1.py", line 578, in startRerequester
    announcers = urls_to_announcers(tracker_urls, **kwargs)
  File "/home/vagrant/murder/BitTornado/Client/Announce.py", line 436, in urls_to_announcers
    for tier in trackerlist]
  File "/home/vagrant/murder/BitTornado/Client/Announce.py", line 436, in <listcomp>
    for tier in trackerlist]
  File "/home/vagrant/murder/BitTornado/Client/Announce.py", line 435, in <listcomp>
    return [[Announcer(url, *args, **kwargs) for url in tier]
  File "/home/vagrant/murder/BitTornado/Client/Announce.py", line 98, in __new__
    return cls.subclasses[scheme](tracker_url, port, *args, **kwargs)
KeyError: ''
vagrant@vagrant:~/murder$

to reproduce environment

clone the repo, cd to test/test_cluster, and run make.

$ git clone https://gitlab.com/davidawad/tbd-murder/
$ cd tbd-murder/test/test_cluster
$ make 

This will create some VM's, (the makefile is really simple) and inside of the seeder vm, I can't run the downloader.

Any ideas? Thanks

OSError: [Errno 107] Transport endpoint is not connected

Traceback (most recent call last):
  File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
    self.sockethandler.handle_events(events)
  File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 293, in handle_events
    s.handler.data_came_in(s, data)
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in
    if not c.data_came_in(data) and not c.closed:
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in
    self.next_func = self.next_func(val.decode())
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 67, in read_header
    r = self.handler.getfunc(self, self.path, self.headers)
  File "/home/BitTornado/BitTornado/Tracker/track.py", line 1005, in get
    rsize = self.add_data(infohash, event, ip, paramslist)
  File "/home/BitTornado/BitTornado/Tracker/track.py", line 795, in add_data
    del x[y][myid]
KeyError: b'-UT3000->c-N\xce\x10o>z\xad\xb2\xae'
Traceback (most recent call last):
  File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 293, in handle_events
    s.handler.data_came_in(s, data)
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in
    if not c.data_came_in(data) and not c.closed:
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in
    self.next_func = self.next_func(val.decode())
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 69, in read_header
    self.answer(r)
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 122, in answer
    self.connection.shutdown(1)
  File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 64, in shutdown
    self.socket.shutdown(val)
OSError: [Errno 107] Transport endpoint is not connected

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
    self.sockethandler.handle_events(events)
  File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 295, in handle_events
    if e[0] != EWOULDBLOCK:
TypeError: 'OSError' object is not subscriptable

This is a big one, I'm not sure how it occured because I was asleep, but might have something to do with scraping...?

Unknown type for bencode

TypeError: Unknown type for bencode: <class 'float'>
Traceback (most recent call last):
  File "/home/BitTornado/BitTornado/Network/RawServer.py", line 109, in listen_forever
    func()
  File "/home/BitTornado/BitTornado/Tracker/track.py", line 1104, in save_state
    self.state.write(self.dfile)
  File "/home/BitTornado/BitTornado/Meta/bencode.py", line 194, in write
    handle.write(bencode(self))
  File "/home/BitTornado/BitTornado/Meta/bencode.py", line 36, in __call__
    self.encode(data, ctext)
  File "/home/BitTornado/BitTornado/Meta/bencode.py", line 60, in encode
    self.encode(data, ctext)
  File "/home/BitTornado/BitTornado/Meta/bencode.py", line 60, in encode
    self.encode(data, ctext)
  File "/home/BitTornado/BitTornado/Meta/bencode.py", line 46, in encode
    self.encode(element, ctext)
  File "/home/BitTornado/BitTornado/Meta/bencode.py", line 46, in encode
    self.encode(element, ctext)
  File "/home/BitTornado/BitTornado/Meta/bencode.py", line 73, in encode
    raise TypeError('Unknown type for bencode: ' + str(type(data)))

I keep getting this, I don't know why, I have 2 torrents in my folder but neither are seeding or being leeched, this just occurs randomly and crashes the tracker, any idea?

I'm using the following cmd btw: ./bttrack.py --port 65000 --dfile dstate --allow_get 1 --allowed_dir ./torrents/ --infopage_redirect "MY_SITE_HERE" --logfile ./logs/log.txt

Doesn't build ...

I've tried a myriad of combinations of Python 2.6, Python 2.7, Python 3.4 (With the python3 branch of course), various wxPython versions, py2exe and none of them can build a working BitTornado on Windows.

The basic problem:
Either I get missing _sysconfigdata, missing psyco (Which is dead and isn't available for anything but Python 2.6 and older), missing win32com.gen.py ...

Can you provide a list of components required to actually build BitTornado, incl. their respective versions?

Or maybe you could even provide a binary somewhere :)

ImportError: cannot import name HTTPSConnection

I am using the master branch on Python3.5 and Python3.3,both show the Error infos.
when i run tracker , it shows as follows:

[root@bogon BitTornado]# python bttrack.py --port 6969 --dfile dstate
Traceback (most recent call last):
File "bttrack.py", line 7, in
from BitTornado.Tracker.track import track
File "/root/BitTornado/BitTornado/Tracker/track.py", line 16, in
from .T2T import T2TList
File "/root/BitTornado/BitTornado/Tracker/T2T.py", line 4, in
from BitTornado.Client.Announce import Announcer
File "/root/BitTornado/BitTornado/Client/Announce.py", line 14, in
from BitTornado.Network.Stream import SharedStream
File "/root/BitTornado/BitTornado/Network/Stream.py", line 17, in
from http.client import HTTPConnection, HTTPSConnection, HTTPException
ImportError: cannot import name HTTPSConnection

Python3.6 can't work

Python3.6 can't work
python btdownloadcurses.py --metafile 1.zip.torrent --saveas 1.zip

| file: 1.zip
| size: 39.08MiB
| dest: /data/data/omcs/web/upfiles/omsa/1.zip
| progress: _______________________________________________________________________________________________________________
| status: download succeeded!
| dl speed: ---
| ul speed: 0.0 KB/s
| sharing: 0.000 (0.0 MB up / 0.0 MB down)
| seeds: 0 seen recently, plus 0.000 distributed copies
| peers: 0 seen now, 0.0% done at 0.0 kB/s

#################################################################

python btdownloadheadless.py --metafile 1.zip.torrent --saveas /tmp/1.zip

| file: 1.zip
| size: 39.08MiB
| dest: /tmp/1.zip
| progress: _______________________________________________________________________________________________________________
| status: connecting to peers (0.0%)
| dl speed: 0.0 KB/s
| ul speed: 0.0 KB/s
| sharing: 0.000 (0.0 MB up / 0.0 MB down)
| seeds: 0 seen now, plus 0.000 distributed copies
| peers: 0 seen now, 0.0% done at 0.0 kB/s
|

btmakemetafile fills screen

Ever since the python 3 port of Bittornado, btmakemetafile now fills the screen rather than simply advancing the progress counter on the same line.

KeyError: b'-UT2210-\xd6b\xd8\xbf\xe0\xcf\xc1\xe9E\x94\x1d\xc6'

Traceback (most recent call last):
  File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
    self.sockethandler.handle_events(events)
  File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 296, in handle_events
    s.handler.data_came_in(s, data)
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in
    if not c.data_came_in(data) and not c.closed:
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in
    self.next_func = self.next_func(val.decode())
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 67, in read_header
    r = self.handler.getfunc(self, self.path, self.headers)
  File "/home/BitTornado/BitTornado/Tracker/track.py", line 1009, in get
    rsize = self.add_data(infohash, event, ip, paramslist)
  File "/home/BitTornado/BitTornado/Tracker/track.py", line 799, in add_data
    del x[y][myid]
KeyError: b'-UT2210-\xd6b\xd8\xbf\xe0\xcf\xc1\xe9E\x94\x1d\xc6'

I think this is related to Issue #30, is this the encrypted peers thing again? And isn't UT2210 uTorrent 2.2.1.0?

Sorry I keep poking you with Issues 😄

codec can't decode byte 0xa0 in position 13

I don't have the Traceback from the 'str' TypeError, it disappeared in my screen window

TypeError: 'str' does not support the buffer interface
Traceback (most recent call last):
  File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
    self.sockethandler.handle_events(events)
  File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 296, in handle_events
    s.handler.data_came_in(s, data)
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in
    if not c.data_came_in(data) and not c.closed:
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in
    self.next_func = self.next_func(val.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 13: invalid start byte
Traceback (most recent call last):
  File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
    self.sockethandler.handle_events(events)
  File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 296, in handle_events
    s.handler.data_came_in(s, data)
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in
    if not c.data_came_in(data) and not c.closed:
  File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in
    self.next_func = self.next_func(val.decode())

Hi again ^^ I have a new error for you, I'm assuming it's caused by a '!' in the filename, I'm currently trying to test this. (basically moving the file out of the parse directory and check if the error still appears)

EDIT:
I removed the ' ! ' from the filename and the error seems to have disappeared, I'll edit or reply again when I see the same error again.

EDIT2:
Nope that was not the issue, I don't know what else it could be.

Error creating announcers

Via @yang502 in #34:

Now I using the master branch on Python3.5.2 , and updated my local Stream.py file.
I can run the tracker successfull.

My torrent file is:

metainfo file.: VMGL_3D_win7.img.torrent
info hash.....: 263b90dc18c5a0c53d07d9c3e7335b4d0d84062c
file name.....: VMGL_3D_win7.img
file size.....: 720764928 (1374 * 524288 + 393216)
announce url..: http://172.21.36.99:6969/announce

But when I want to download the torrent file ,it shows as follows:

ERROR:
http seed url not http: 
saving:         VMGL_3D_win7.img (687.4 MB)
percent done:   0.0
time left:      
download to:    /root/BitTornado/VMGL_3D_win7.img
download rate:  
upload rate:    
share rating:   
seed status:    
peer status:    
Traceback (most recent call last):
  File "btdownloadheadless.py", line 224, in <module>
    run(sys.argv[1:])
  File "btdownloadheadless.py", line 192, in run
    dow.startRerequester()
  File "/root/BitTornado/BitTornado/Client/download_bt1.py", line 578, in startRerequester
    announcers = urls_to_announcers(tracker_urls, **kwargs)
  File "/root/BitTornado/BitTornado/Client/Announce.py", line 436, in urls_to_announcers
    for tier in trackerlist]
  File "/root/BitTornado/BitTornado/Client/Announce.py", line 436, in <listcomp>
    for tier in trackerlist]
  File "/root/BitTornado/BitTornado/Client/Announce.py", line 435, in <listcomp>
    return [[Announcer(url, *args, **kwargs) for url in tier]
  File "/root/BitTornado/BitTornado/Client/Announce.py", line 98, in __new__
    return cls.subclasses[scheme](tracker_url, port, *args, **kwargs)
KeyError: ''

Invalid key: path.utf-8

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/BitTornado/BitTornado/Network/RawServer.py", line 109, in listen_forever
    func()
  File "/home/BitTornado/BitTornado/Tracker/track.py", line 1123, in parse_allowed
    [".torrent"])
  File "/home/BitTornado/BitTornado/Application/parsedir.py", line 81, in parsedir
    torrentinfo, infohash = parse_torrent(path, return_metainfo)
  File "/home/BitTornado/BitTornado/Application/parsedir.py", line 163, in parse_torrent
    data = MetaInfo.read(path)
  File "/home/BitTornado/BitTornado/Meta/bencode.py", line 203, in read
    **kwargs)
  File "/home/BitTornado/BitTornado/Meta/Info.py", line 408, in __init__
    super(MetaInfo, self).__init__(*args, **kwargs)
  File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 88, in __init__
    self[k] = v
  File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 114, in __setitem__
    val = self.typemap[key](val)
  File "/home/BitTornado/BitTornado/Meta/Info.py", line 227, in __init__
    self['files'] = params['files']
  File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 114, in __setitem__
    val = self.typemap[key](val)
  File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 10, in __init__
    self.extend(iterable)
  File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 56, in extend
    self.append(val)
  File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 25, in append
    val = self.valtype(val)
  File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 88, in __init__
    self[k] = v
  File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 119, in __setitem__
    raise KeyError('Invalid key: ' + key)
KeyError: 'Invalid key: path.utf-8'

I'm not sure what causes this... it happens when I try to start the tracker.

how can the btmakemetafile.py support filename include Chinese ?

I am using the branch on Python2.7 .

BitTornado/btmakemetafile.py http:172.21.108.66:6969/announce /opt/yang/iso/win7高中模板.base

error: bad filename: win7高中模板.base
run with no args for parameter explanations
How can the makebt file can support filename include Chinese?

Create torrents from a list of files

Currently BTTree can be built to hold either a single file, or a full directory with all files and subdirectories. I would like to create torrent files from a specific list of files I have built through other means, and I am wondering which of the following options you may find the more acceptable:

  • adapt BTTree.__init__() so that loc can be a list of paths, and use something like if isinstance(loc, list):… to call specific code
  • do not touch BTTree and create a new function alongside make_meta_file that builds the specific BTTree hierarchy manually
  • you think it’s the user’s job to subclass BTTree and reimplement make_meta_file to suit their needs, and prefer that this feature remains outside of BitTornado
  • something else entirely

Note that I will be adding this feature and using it in production for several years whatever happens, so it’s up to you to decide whether you want it available for others :)

KeyError: 'Invalid key: attr'

Hi,
after i had installed (setup.py --install -f) under CentOS7 and python3.4.9, comes this when i will start the tacker:

/usr/bin/bttrack.py

Traceback (most recent call last):
File "/usr/bin/bttrack.py", line 7, in
from BitTornado.Tracker.track import track
ImportError: No module named 'BitTornado.Tracker'

Can anybody help me? Is there anywhere a ready RPM package? I am not a developer...
Greetings from Marko

can not share data with the same btdownloadheadless.py client each other.

i am using the master branch on python 3.5

my torrent file is:

root@ubuntu-server:/tmp# btshowmetainfo.py debian-8.4.0-openstack-amd64.qcow2.torrent 
btshowmetainfo 20130326 - decode BitTorrent metainfo files

metainfo file.: debian-8.4.0-openstack-amd64.qcow2.torrent
info hash.....: 2ad139893ce44cbe94e93522d4563df5f6e0aabe
file name.....: debian-8.4.0-openstack-amd64.qcow2
file size.....: 481034240 (1835 * 262144 + 0)
announce url..: http://172.20.4.22:6969/announce

start a tracker server on http://172.20.4.22:6969/announce

start a bt client on the tracker server as seeder server.

~# btdownloadheadless.py debian-8.4.0-openstack-amd64.qcow2.torrent

saving:         debian-8.4.0-openstack-amd64.qcow2 (458.8 MB)
percent done:   0.0
time left:      Download Succeeded!
download to:    /home/zlh/ISO/debian-8.4.0-openstack-amd64.qcow2
download rate:  
upload rate:    0.0 kB/s
share rating:   0.000   (0.0 MB up / 0.0 MB down)
seed status:    0 seen recently, plus 0.000 distributed copies
peer status:    0 seen now, 0.0% done at 0.0 kB/s

start a another bt client on another computer, but they can not share data with each other.

~$ btdownloadheadless.py debian-8.4.0-openstack-amd64.qcow2.torrent
saving:         debian-8.4.0-openstack-amd64.qcow2 (458.8 MB)
percent done:   0.0
time left:      
download to:    /tmp/debian-8.4.0-openstack-amd64.qcow2
download rate:  0.0 kB/s
upload rate:    0.0 kB/s
share rating:   0.000   (0.0 MB up / 0.0 MB down)
seed status:    0 seen now, plus 0.000 distributed copies
peer status:    0 seen now, 0.0% done at 0.0 kB/s

but:
if i use another btclient as the seeder server or client, they can share data with btdownloadheadless.py. i have tested the original python-bittorrent and deluge.

thanks,effigies, do you have the same problem on you computer?

Please implement --allow-insecure-filename

There is an ongoing problem with some official torrent providers, where they inlcude paths (slash) in the filename. For years. Despite the huge amounts of negative feedback from users.

Right now the only way to download those is to patch bt regex in Meta/Info.py to allow paths, but it's really ugly.
There is --security 0 but it seems not to be checked for this particular check. Too bad.
I briefly checked the code but I don't see the options available in Info.py, so instead of a pull request I request this: please implement a switch to be able to download filenames with slashes or possibly other junk, under the risk of the user. It is not much worse than having security=0. :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.