summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-17 14:13:05 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-17 14:13:05 +0100
commita5c54449530aa558222a47354e7873b5203a3374 (patch)
tree046ad60aaf4120e16854a386e5ded7427d74ce48 /module/plugins/hoster
parentAdded tag v0.4.5 for changeset 73cb51958a1d (diff)
downloadpyload-a5c54449530aa558222a47354e7873b5203a3374.tar.xz
closed #254
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/ShareCx.py30
-rw-r--r--module/plugins/hoster/UploadedTo.py12
2 files changed, 26 insertions, 16 deletions
diff --git a/module/plugins/hoster/ShareCx.py b/module/plugins/hoster/ShareCx.py
index d1a78f0dc..8381c7909 100644
--- a/module/plugins/hoster/ShareCx.py
+++ b/module/plugins/hoster/ShareCx.py
@@ -36,15 +36,18 @@ class ShareCx(Hoster):
__name__ = "ShareCx"
__type__ = "hoster"
__pattern__ = r"http://[\w\.]*?share\.cx/(files|videos)/\d+"
- __version__ = "0.2"
+ __version__ = "0.3"
__description__ = """Share.cx Download Hoster"""
__author_name__ = ("jeix")
__author_mail__ = ("jeix@hasnomail.de")
-
-
- def setup(self):
- self.multiDL = False
-
+
+
+ def init(self):
+ if self.account:
+ self.multiDL = True
+ else:
+ self.multiDL = False
+
def process(self, pyfile):
self.pyfile = pyfile
@@ -53,13 +56,16 @@ class ShareCx(Hoster):
self.offline()
pyfile.name = self.get_file_name()
- self.doDownload()
+ if self.account:
+ self.handlePremium()
+ else:
+ self.handleFree()
def download_html(self):
- self.html = self.load(self.pyfile.url)
+ self.html = self.load(self.pyfile.url, cookies=False)
- def doDownload(self):
+ def handleFree(self):
""" returns the absolute downloadable filepath
"""
if self.html is None:
@@ -145,7 +151,7 @@ class ShareCx(Hoster):
if self.html is None:
self.download_html()
- name = re.search(r'<title>Download: (.*?) at Share.cx</title>', self.html).group(1)
+ name = re.search(r'/></span>([^/]+)</h3>', self.html).group(1)
return name
def file_exists(self):
@@ -158,5 +164,7 @@ class ShareCx(Hoster):
return False
return True
-
+
+ def handlePremium(self):
+ self.download(self.pyfile.url)
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 2dff549a4..311170c49 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -35,7 +35,7 @@ class UploadedTo(Hoster):
__name__ = "UploadedTo"
__type__ = "hoster"
__pattern__ = r"http://(?:www\.)?u(?:p)?l(?:oaded)?\.to/(?:file/|\?id=)?(.+)"
- __version__ = "0.4"
+ __version__ = "0.41"
__description__ = """Uploaded.to Download Hoster"""
__author_name__ = ("spoob", "mkaay")
__author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de")
@@ -45,11 +45,14 @@ class UploadedTo(Hoster):
self.html = None
self.data = {}
self.multiDL = False
+ self.resumeDownload = False
self.url = False
if self.account:
- self.multiDL = True
- self.chunkLimit = -1
- self.resumeDownload = True
+ self.premium = self.account.getAccountInfo(self.user)
+ if self.premium:
+ self.multiDL = True
+ self.chunkLimit = -1
+ self.resumeDownload = True
self.pyfile.url = self.cleanUrl(self.pyfile.url)
@@ -67,7 +70,6 @@ class UploadedTo(Hoster):
pyfile.name = self.data["name"]
# self.pyfile.name = self.get_file_name()
- self.premium = self.account.getAccountInfo(self.user)
if self.account and self.premium:
self.handlePremium()