diff --git a/couchpotato/core/providers/torrent/cPASbien/main.py b/couchpotato/core/providers/torrent/cPASbien/main.py index e4134f7c1e62965f3aa920ffadca8c9bf93250be..c57962132e1071023be0486c11bd6cf7d8c036e5 100755 --- a/couchpotato/core/providers/torrent/cPASbien/main.py +++ b/couchpotato/core/providers/torrent/cPASbien/main.py @@ -238,4 +238,20 @@ class cPASbien(TorrentProvider): except: log.error('Failed downloading from %s: %s', (self.getName(), traceback.format_exc())) - \ No newline at end of file + def download(self, url = '', nzb_id = ''): + + if not self.login_opener and not self.login(): + return + + values = { + 'url' : '/' + } + data_tmp = urllib.urlencode(values) + req = urllib2.Request(url, data_tmp ) + + try: + log.error('Failed downloading from %s', self.getName()) + return urllib2.urlopen(req).read() + except: + log.error('Failed downloading from %s: %s', (self.getName(), traceback.format_exc())) + \ No newline at end of file diff --git a/couchpotato/core/providers/torrent/t411/main.py b/couchpotato/core/providers/torrent/t411/main.py index 58d8784efbcd531742e44e24368b32cbe1fa76d3..c641e9647540bb2b6885fe9c4c8eff94bf5174b7 100644 --- a/couchpotato/core/providers/torrent/t411/main.py +++ b/couchpotato/core/providers/torrent/t411/main.py @@ -12,6 +12,7 @@ import re import time import traceback import urllib2 +import urllib import unicodedata log = CPLog(__name__) @@ -183,4 +184,22 @@ class t411(TorrentProvider): 'password': self.conf('password'), 'remember': '1', 'url': '/' - }) \ No newline at end of file + }) + + + def download(self, url = '', nzb_id = ''): + + if not self.login_opener and not self.login(): + return + + values = { + 'url' : '/' + } + data_tmp = urllib.urlencode(values) + req = urllib2.Request(url, data_tmp ) + + try: + log.error('Failed downloading from %s', self.getName()) + return urllib2.urlopen(req).read() + except: + log.error('Failed downloading from %s: %s', (self.getName(), traceback.format_exc())) \ No newline at end of file