diff options
| author | 2013-10-23 14:21:05 +0200 | |
|---|---|---|
| committer | 2013-10-23 14:21:05 +0200 | |
| commit | 57f21830085d3d5944b8d33fc9825d577e81ed8a (patch) | |
| tree | 803407139336ee94f5f61b09f8e418cafcd9b0d8 /module/plugins | |
| parent | Merge pull request #331 from vuolter/s/hoster_lc (diff) | |
| download | pyload-57f21830085d3d5944b8d33fc9825d577e81ed8a.tar.xz | |
Cleanup for setup vars.
See #315
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/hoster/CzshareCom.py | 5 | ||||
| -rw-r--r-- | module/plugins/hoster/DepositfilesCom.py | 5 | ||||
| -rw-r--r-- | module/plugins/hoster/EgoFilesCom.py | 3 | ||||
| -rw-r--r-- | module/plugins/hoster/FileApeCom.py | 1 | ||||
| -rw-r--r-- | module/plugins/hoster/FilesMailRu.py | 1 | ||||
| -rw-r--r-- | module/plugins/hoster/MyvideoDe.py | 3 | ||||
| -rw-r--r-- | module/plugins/hoster/NetloadIn.py | 5 | ||||
| -rw-r--r-- | module/plugins/hoster/ShareplaceCom.py | 4 | ||||
| -rw-r--r-- | module/plugins/hoster/ShragleCom.py | 1 | ||||
| -rw-r--r-- | module/plugins/hoster/UploadedTo.py | 11 | ||||
| -rw-r--r-- | module/plugins/hoster/WebshareCz.py | 3 | ||||
| -rw-r--r-- | module/plugins/hoster/WuploadCom.py | 6 | ||||
| -rw-r--r-- | module/plugins/hoster/X7To.py | 11 | ||||
| -rw-r--r-- | module/plugins/hoster/XHamsterCom.py | 3 | ||||
| -rw-r--r-- | module/plugins/hoster/YoupornCom.py | 3 | ||||
| -rw-r--r-- | module/plugins/hoster/YourfilesTo.py | 4 | 
16 files changed, 10 insertions, 59 deletions
| diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index fdfce6226..58573d329 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -47,10 +47,6 @@ class CzshareCom(SimpleHoster):      MULTIDL_PATTERN = r"<p><font color='red'>Z[^<]*PROFI.</font></p>"      USER_CREDIT_PATTERN = r'<div class="credit">\s*kredit: <strong>([0-9., ]+)([kKMG]i?B)</strong>\s*</div><!-- .credit -->' -    def setup(self): -        self.multiDL = self.resumeDownload = self.premium -        self.chunkLimit = 1 -      def checkTrafficLeft(self):          # check if user logged in          found = re.search(self.USER_CREDIT_PATTERN, self.html) @@ -136,7 +132,6 @@ class CzshareCom(SimpleHoster):          url = "http://%s/download.php?%s" % (found.group(1), found.group(2))          self.wait() -        self.multiDL = True          self.download(url)          self.checkDownloadedFile() diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 7a84fdb25..01589f206 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -26,10 +26,6 @@ class DepositfilesCom(SimpleHoster):      RECAPTCHA_PATTERN = r"Recaptcha.create\('([^']+)'"      DOWNLOAD_LINK_PATTERN = r'<form id="downloader_file_form" action="(http://.+?\.(dfiles\.eu|depositfiles\.com)/.+?)" method="post"' -    def setup(self): -        self.multiDL = False -        self.resumeDownload = self.premium -      def handleFree(self):          self.html = self.load(self.pyfile.url, post={"gateway_result": "1"}, cookies=True)          if re.search(self.FILE_OFFLINE_PATTERN, self.html): @@ -113,7 +109,6 @@ class DepositfilesCom(SimpleHoster):              self.retry()          link = unquote(              re.search('<div id="download_url">\s*<a href="(http://.+?\.depositfiles.com/.+?)"', self.html).group(1)) -        self.multiDL = True          self.download(link, disposition=True) diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index 274286cf1..22ca99931 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -39,8 +39,7 @@ class EgoFilesCom(SimpleHoster):      DIRECT_LINK_PATTERN = r'<a href="(?P<link>[^"]+)">Download ></a>'      RECAPTCHA_KEY = '6LeXatQSAAAAAHezcjXyWAni-4t302TeYe7_gfvX' -    def init(self): -        self.file_info = {} +    def setup(self):          # Set English language          self.load("https://egofiles.com/ajax/lang.php?lang=en", just_header=True) diff --git a/module/plugins/hoster/FileApeCom.py b/module/plugins/hoster/FileApeCom.py index dcfb4b3ca..f07fbfc8a 100644 --- a/module/plugins/hoster/FileApeCom.py +++ b/module/plugins/hoster/FileApeCom.py @@ -16,7 +16,6 @@ class FileApeCom(Hoster):      def setup(self):          self.multiDL = False -        self.html = None      def process(self, pyfile):          self.pyfile = pyfile diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index b18fec77b..720013657 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -41,7 +41,6 @@ class FilesMailRu(Hoster):      def setup(self):          if not self.account:              self.multiDL = False -            self.chunkLimit = 1      def process(self, pyfile):          self.html = self.load(pyfile.url) diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py index e32fee5c8..1bd73e376 100644 --- a/module/plugins/hoster/MyvideoDe.py +++ b/module/plugins/hoster/MyvideoDe.py @@ -14,9 +14,6 @@ class MyvideoDe(Hoster):      __author_name__ = ("spoob")      __author_mail__ = ("spoob@pyload.org") -    def setup(self): -        self.html = None -      def process(self, pyfile):          self.pyfile = pyfile          self.download_html() diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index ff72a3b63..71c8dd4f2 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -59,10 +59,7 @@ class NetloadIn(Hoster):      __author_mail__ = ("spoob@pyload.org", "ranan@pyload.org", "gregy@gregy.cz")      def setup(self): -        self.multiDL = False -        if self.premium: -            self.multiDL = self.resumeDownload = True -            self.chunkLimit = -1 +        self.multiDL = self.resumeDownload = self.premium      def process(self, pyfile):          self.url = pyfile.url diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py index 5f23f9708..e51c3160f 100644 --- a/module/plugins/hoster/ShareplaceCom.py +++ b/module/plugins/hoster/ShareplaceCom.py @@ -15,10 +15,6 @@ class ShareplaceCom(Hoster):      __author_name__ = ("ACCakut, based on YourfilesTo by jeix and skydancer")      __author_mail__ = ("none") -    def setup(self): -        self.html = None -        self.multiDL = True -      def process(self, pyfile):          self.pyfile = pyfile          self.prepare() diff --git a/module/plugins/hoster/ShragleCom.py b/module/plugins/hoster/ShragleCom.py index 2a2738974..5d19afbc7 100644 --- a/module/plugins/hoster/ShragleCom.py +++ b/module/plugins/hoster/ShragleCom.py @@ -46,7 +46,6 @@ class ShragleCom(Hoster):      __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz")      def setup(self): -        self.html = None          self.multiDL = False          self.check_data = None diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index aee7f32b1..88a8edebb 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -89,7 +89,7 @@ class UploadedTo(Hoster):      __name__ = "UploadedTo"      __type__ = "hoster"      __pattern__ = r"https?://[\w\.-]*?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)" -    __version__ = "0.71" +    __version__ = "0.72"      __description__ = """Uploaded.net Download Hoster"""      __author_name__ = ("spoob", "mkaay", "zoidberg", "netpok", "stickell")      __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz", @@ -100,14 +100,8 @@ class UploadedTo(Hoster):      DL_LIMIT_PATTERN = "You have reached the max. number of possible free downloads for this hour"      def setup(self): -        self.html = None -        self.multiDL = self.resumeDownload = False -        self.url = False +        self.multiDL = self.resumeDownload = self.premium          self.chunkLimit = 1  # critical problems with more chunks -        if self.account: -            self.premium = self.account.getAccountInfo(self.user)["premium"] -            if self.premium: -                self.multiDL = self.resumeDownload = True          self.fileID = getID(self.pyfile.url)          self.pyfile.url = "http://uploaded.net/file/%s" % self.fileID @@ -196,7 +190,6 @@ class UploadedTo(Hoster):          downloadURL = ""          for i in range(5): -            #self.req.lastURL = str(self.url)              re_captcha = ReCaptcha(self)              challenge, result = re_captcha.challenge(challengeId.group(1))              options = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": result} diff --git a/module/plugins/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py index 10a8078c5..1c9ddb290 100644 --- a/module/plugins/hoster/WebshareCz.py +++ b/module/plugins/hoster/WebshareCz.py @@ -34,9 +34,6 @@ class WebshareCz(SimpleHoster):      DOWNLOAD_LINK_PATTERN = r'id="download_link" href="(?P<url>.*?)"' -    def setup(self): -        self.multiDL = True -      def handleFree(self):          url_a = re.search(r"(var l.*)", self.html).group(1)          url_b = re.search(r"(var keyStr.*)", self.html).group(1) diff --git a/module/plugins/hoster/WuploadCom.py b/module/plugins/hoster/WuploadCom.py index 3dab1b1bb..aaeeb59fd 100644 --- a/module/plugins/hoster/WuploadCom.py +++ b/module/plugins/hoster/WuploadCom.py @@ -47,7 +47,7 @@ class WuploadCom(Hoster):      __name__ = "WuploadCom"      __type__ = "hoster"      __pattern__ = r"http://[\w\.]*?wupload\..*?/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?" -    __version__ = "0.21" +    __version__ = "0.22"      __description__ = """Wupload com"""      __author_name__ = ("jeix", "paulking")      __author_mail__ = ("jeix@hasnomail.de", "") @@ -62,9 +62,7 @@ class WuploadCom(Hoster):      CAPTCHA_TYPE1_PATTERN = r'Recaptcha.create\("(.*?)",'      CAPTCHA_TYPE2_PATTERN = r'id="recaptcha_image"><img style="display: block;" src="(.+)image?c=(.+?)"' -    def init(self): -        if self.account: -            self.premium = self.account.getAccountInfo(self.user)["premium"] +    def setup(self):          if not self.premium:              self.chunkLimit = 1              self.multiDL = False diff --git a/module/plugins/hoster/X7To.py b/module/plugins/hoster/X7To.py index 1b8850d9d..59ec6ed06 100644 --- a/module/plugins/hoster/X7To.py +++ b/module/plugins/hoster/X7To.py @@ -12,19 +12,16 @@ class X7To(Hoster):      __name__ = "X7To"      __type__ = "hoster"      __pattern__ = r"http://(?:www.)?x7.to/" -    __version__ = "0.3" +    __version__ = "0.4"      __description__ = """X7.To File Download Hoster"""      __author_name__ = ("ernieb")      __author_mail__ = ("ernieb")      FILE_INFO_PATTERN = r'<meta name="description" content="Download: (.*?) \(([0-9,.]+) (KB|MB|GB)\)' -    def init(self): -        if self.premium: -            self.multiDL = self.resumeDownload = False -            self.chunkLimit = 1 -        else: -            self.multiDL = False +    def setup(self): +        self.multiDL = self.resumeDownload = False +        self.chunkLimit = 1          self.file_id = re.search(r"http://x7.to/([a-zA-Z0-9]+)", self.pyfile.url).group(1)          self.logDebug("file id is %s" % self.file_id) diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index cbdd818c7..721f1cb75 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -24,9 +24,6 @@ class XHamsterCom(Hoster):      __config__ = [("type", ".mp4;.flv", "Preferred type", ".mp4")]      __description__ = """XHamster.com Video Download Hoster""" -    def setup(self): -        self.html = None -      def process(self, pyfile):          self.pyfile = pyfile diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py index d029db7ba..b0d594ca5 100644 --- a/module/plugins/hoster/YoupornCom.py +++ b/module/plugins/hoster/YoupornCom.py @@ -14,9 +14,6 @@ class YoupornCom(Hoster):      __author_name__ = ("willnix")      __author_mail__ = ("willnix@pyload.org") -    def setup(self): -        self.html = None -      def process(self, pyfile):          self.pyfile = pyfile diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index 8c0784205..0fd094f61 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -15,10 +15,6 @@ class YourfilesTo(Hoster):      __author_name__ = ("jeix", "skydancer")      __author_mail__ = ("jeix@hasnomail.de", "skydancer@hasnomail.de") -    def setup(self): -        self.html = None -        self.multiDL = True -      def process(self, pyfile):          self.pyfile = pyfile          self.prepare() | 
