diff options
author | mkaay <mkaay@mkaay.de> | 2010-12-19 20:53:54 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-12-19 20:53:54 +0100 |
commit | a8b5b705427b25b3a9a20c6e2c77ca8d9dd8a7d4 (patch) | |
tree | 42b295cfa31f1d40c2fb4fc9793b4e5b87e8d142 /module/network/Browser.py | |
parent | some adjusments (diff) | |
download | pyload-a8b5b705427b25b3a9a20c6e2c77ca8d9dd8a7d4.tar.xz |
new network backend: xdcc support
Diffstat (limited to 'module/network/Browser.py')
-rw-r--r-- | module/network/Browser.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/module/network/Browser.py b/module/network/Browser.py index b749a8338..90502b298 100644 --- a/module/network/Browser.py +++ b/module/network/Browser.py @@ -2,6 +2,7 @@ from HTTPBase import HTTPBase from HTTPDownload import HTTPDownload from os.path import exists +from randowm import randint import zlib from cookielib import CookieJar @@ -66,6 +67,12 @@ class Browser(): d = dwnld.download(resume=resume) return d + + def xdccDownload(self, server, port, channel, bot, pack, filename, nick="pyload_%d" % randint(1000,9999), ident="pyload", real="pyloadreal"): + dwnld = XDCCDownload(server, port, channel, bot, pack, nick, ident, real, filename, bucket=self.bucket, interface=self.interface, proxies=self.proxies) + + d = dwnld.download() + return d if __name__ == "__main__": browser = Browser(proxies={"socks5": "localhost:5000"}) |