uTorrent WebUI command line utility and library for Python 3 (Page 3) / Web API / µTorrent Community Forums
 

#51 2011-06-24 03:21:07

jbmia
Member

Re: uTorrent WebUI command line utility and library for Python 3

Thanks!  Installed Python3 and got it working...

Question?  I'm looking for the ability to pull up "statistics" like those shown when you hit help/statistics in the gui client?   

Any way of doing this with your tool?   web ui doesn't provide this data... 

Checked help of course, and didn't see anything, but thought I'd double check.. thanks!

jb

Offline

#52 2011-06-24 03:26:59

twistedfall
Member

Re: uTorrent WebUI command line utility and library for Python 3

It's not possible atm. But I have this planned. What kind of info do you think you need?

Offline

#53 2011-06-24 03:38:37

jbmia
Member

Re: uTorrent WebUI command line utility and library for Python 3

btw... tried the -l -s COMPLETED_ON and -l -s ADDED_ON and I'm not seeing any differences.. Tried other sort params as well... always getting the same sort..  I seem to be getting a sort based on what appears to be "description" no matter which param I choose... is the sort function working?   or am I missing something?

jb

Offline

#54 2011-06-24 03:46:49

twistedfall
Member

Re: uTorrent WebUI command line utility and library for Python 3

I see, it's case sensitive currently, so you need to use completed_on and added_on in lowercase. All the possible sort fields are shown in help (--help) for --sort command.

Offline

#55 2011-06-24 05:56:04

jbmia
Member

Re: uTorrent WebUI command line utility and library for Python 3

Thanks for the quick replies!

I'm looking for this information:  http://image.torrent-invites.com/images/370windows.png   
Reference the stats window in the center of the page.    Apparently this information is really easy to pull up for the gui client, but isn't available when using utorrent server / web ui...  Any assistance you can provide would be immensely appreciated!

Going  back to the sort function, the "eta" and "added_on" params seem to work fine, but I get the following error when using "completed_on":

python3 utorrentctl.py -l -s completed_on
Traceback (most recent call last):
  File "utorrentctl.py", line 1368, in <module>
    for h, t in sorted( utorrent.torrent_list().items(), key = lambda x: getattr( x[1], opts.sort_field ), reverse = opts.sort_desc ):
TypeError: unorderable types: int() < datetime.datetime()

BTW, is there any way I can send you a PM or email directly?

Regards,

JB

Last edited by jbmia (2011-06-24 06:00:51)

Offline

#56 2011-06-24 06:09:01

twistedfall
Member

Re: uTorrent WebUI command line utility and library for Python 3

I have uploaded a quick fix for this issue. Please download the script once again to see if it helps.

P.S. Also made it ignore sortfield case

Last edited by twistedfall (2011-06-24 06:14:31)

Offline

#57 2011-06-24 06:24:19

jbmia
Member

Re: uTorrent WebUI command line utility and library for Python 3

Thanks!  Sort by "completed_on" works now... very useful...  btw, just sent you a message over on github.

jb

Offline

#58 2011-06-25 03:16:44

twistedfall
Member

Re: uTorrent WebUI command line utility and library for Python 3

I have added support for reporting statistics. It turns out µTorrent Linux server doesn't report that plethora of statistical information as desktop client displays, basically only the transfer statistics for the last month are available.

Offline

#59 2011-06-25 04:36:28

jbmia
Member

Re: uTorrent WebUI command line utility and library for Python 3

Sweet! Thanks for the stats!

Couple things.. is the month limit the same in the gui client or is that a function of utorrent server?

Also, I tried the stats command and I'm getting the following:

[root@home Public]# ./utorrentctl.py --stats
No address associated with hostname

In fact, I get the same error with other commands as well... e.g., :

[root@home Public]# ./utorrentctl.py -l
No address associated with hostname

My config.py file is populated with the same config that worked prior to this update...   Think something changed on my side or did the stat update break something?  BTW, --help still works fine... didn't try other commands...

jbmia

Offline

#60 2011-06-25 05:18:24

twistedfall
Member

Re: uTorrent WebUI command line utility and library for Python 3

Seems like the error on your side. Do you have server address written as host name in config.py? If yes, please try specifying the IP address.

> Couple things.. is the month limit the same in the gui client or is that a function of utorrent server?

I'm not sure. µTorrent Linux server doesn't provide a way to compare these numbers and I didn't check if desktop client WebUI offers getxferhist command.

Last edited by twistedfall (2011-06-25 05:20:55)

Offline

#61 2011-07-05 04:58:05

twistedfall
Member

Re: uTorrent WebUI command line utility and library for Python 3

New version with ability to specify format of torrent list with -f. For example to show only name and ratio with sorting:

utorrentctl -l -f "{name} {ratio}" -s ratio

Full list of field can be received by issuing --dump on any torrent. Please be advised that this list differs for desktop and server versions of µTorrent.

Offline

#62 2011-07-28 12:02:01

petesimon
Member

Re: uTorrent WebUI command line utility and library for Python 3

I use utserver for Linux (under Ubuntu) on a dedicated little box... separate from my windows pc. Thanks for the script.

Offline

#63 2011-07-28 12:03:52

twistedfall
Member

Re: uTorrent WebUI command line utility and library for Python 3

You are welcome smile I use the similar setup

Offline

#64 2011-11-01 05:29:38

twistedfall
Member

Re: uTorrent WebUI command line utility and library for Python 3

Added ability to specify API version in config file. This should speed up initial handshake a bit.

Offline

#65 2012-01-17 19:28:26

agentblueuk
Member

Re: uTorrent WebUI command line utility and library for Python 3

Can you provide a full example of setting up RSS.

I have added a new RSS feed, but I can't get the filter stuff to work so the RSS has no effect.

./utorrentctl.py --server-version
uTorrent/300B(25053)(server) ub1010-no/UT300B server v3.0.0.25053, engine v25053, ui v25053

./utorrentctl.py --rss-list
Feeds:
   1   on  TVTorrents.com|<url removed from post> (0/4) update: 2012-01-18 03:41:30
   Filters:
      1   on  New Filter  -> : +-

./utorrentctl.py --rssfilter-dump  - returns no output

Offline

#66 2012-01-18 01:26:44

twistedfall
Member

Re: uTorrent WebUI command line utility and library for Python 3

Actually --rss-filter-dump requires that you supply the filter id so it your case it should look like this:

--rss-filter-dump 1

Does that solve your problem?

Offline

#67 2012-02-11 12:06:59

schwasskin
Member

Re: uTorrent WebUI command line utility and library for Python 3

Big thanks to TwistedFall.
I made a bash script type interace for this I use it for a remote server. This has more functionality that the webUI so NICE.

You can grab the script from:
http://lessthanhightech.weebly.com/utor … rface.html

Allows you to add torrents with url even from private trackers with the right configuration.
Thanks again all who made this work.

Offline

#68 2012-02-17 10:28:56

peace4all
Member

Re: uTorrent WebUI command line utility and library for Python 3

Hi,
I am looking for som to do download torrent data using magnet link. and wand to have command line client. Also it should indicate ( by some means) that torent is downloaded and seeding i startted.

Can I use utorrent for this ?

Any help will be appretiated

--mirani

Offline

#69 2012-03-10 08:07:31

danielkoster
Member

Re: uTorrent WebUI command line utility and library for Python 3

Hi, love this tool!
I had a question though. You can add torrents by supplying the torrent name via the --add-file command, but I would also like to be able to set the download folder. There is a command called --dir=DOWNLOAD_DIR, but if I user it, it says my command is invallid.
For reference, this is my command: utorrentctl.py -H <ip>:<port> -U "username" -P "password" --add-file "torrent location". If I add --dir="download location" at the end of this, it says invalid request. Without, it works just fine.

If you, or someone else could help me, it would be appreciated!

Offline

#70 2012-04-10 14:25:04

jmb_utorrent
Member

Re: uTorrent WebUI command line utility and library for Python 3

since version 3.2 Build 27026, utorrentctl don't work

IndexError: list index out of range

sad

Offline

#71 2012-07-28 02:44:04

schwasskin
Member

Re: uTorrent WebUI command line utility and library for Python 3

Has anyone gotten this to work on windows? Im on server 2008 x86 and have tried everything.
Have gotten multiple errors with different versions of python. Using Utorrent 3.2

3.1.4
Traceback (most recent call last):
  File "c:\users\torrent\desktop\utorrentctl.py", line 1490, in <module>
    utorrent = uTorrentConnection( opts.host, opts.user, opts.password ).utorren
t( opts.api )
  File "c:\users\torrent\desktop\utorrentctl.py", line 882, in utorrent
    ver = Version( self.do_action( "getversion", retry = False ) )
  File "c:\users\torrent\desktop\utorrentctl.py", line 172, in __init__
    self.date = datetime.datetime( *map( int, date[0].split( "-" ) + date[1].spl
it( ":" ) ) )
IndexError: list index out of range

3.0.1 ( had to edit line 23 to get this version to work this far)
Traceback (most recent call last):
  File "c:\users\torrent\desktop\utorrentctl.py", line 1490, in <module>
    utorrent = uTorrentConnection( opts.host, opts.user, opts.password ).utorren
t( opts.api )
  File "c:\users\torrent\desktop\utorrentctl.py", line 730, in __init__
    self._url = "http://{}/".format( self._host )
ValueError: zero length field name in format

3.2.3
Traceback (most recent call last):
  File "c:\users\torrent\desktop\utorrentctl.py", line 1490, in <module>
    utorrent = uTorrentConnection( opts.host, opts.user, opts.password ).utorren
t( opts.api )
  File "c:\users\torrent\desktop\utorrentctl.py", line 882, in utorrent
    ver = Version( self.do_action( "getversion", retry = False ) )
  File "c:\users\torrent\desktop\utorrentctl.py", line 172, in __init__
    self.date = datetime.datetime( *map( int, date[0].split( "-" ) + date[1].spl
it( ":" ) ) )
IndexError: list index out of range



OK I got this to work used --api=falcon FTW

Last edited by schwasskin (2012-07-28 10:12:02)

Offline

#72 2012-07-30 02:21:33

schwasskin
Member

Re: uTorrent WebUI command line utility and library for Python 3

Just want to bump this thread for some windows help

When I send the output to a text file it is all strung out any help would be great. Not very good with python.

Last edited by schwasskin (2012-07-30 21:02:17)

Offline

Board footer

Powered by FluxBB

©2013 BitTorrent, Inc. µTorrent is a trademark of BitTorrent, Inc.