diff options
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"}) |