summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/XFileSharingPro.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-12 13:11:11 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-12 13:11:11 +0200
commitfc638ded28b7b222203fba9907b6bf7f828d1b7b (patch)
tree7bc4f95042c9f4a036901837e74248b257506675 /pyload/plugins/hoster/XFileSharingPro.py
parentadded legacy file to fix older plugins (diff)
parentMerge pull request #193 from vuolter/plugin/UnrestrictLi (diff)
downloadpyload-fc638ded28b7b222203fba9907b6bf7f828d1b7b.tar.xz
Merge remote-tracking branch 'origin/stable'
Conflicts: module/plugins/accounts/Premium4Me.py pyload/plugins/addons/Premium4Me.py pyload/plugins/crypter/NCryptIn.py pyload/plugins/hooks/Captcha9kw.py pyload/plugins/hoster/Premium4Me.py pyload/plugins/hoster/Xdcc.py pyload/plugins/hoster/XvidstageCom.py
Diffstat (limited to 'pyload/plugins/hoster/XFileSharingPro.py')
-rw-r--r--pyload/plugins/hoster/XFileSharingPro.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/pyload/plugins/hoster/XFileSharingPro.py b/pyload/plugins/hoster/XFileSharingPro.py
index 1120a2a8b..2103b0c20 100644
--- a/pyload/plugins/hoster/XFileSharingPro.py
+++ b/pyload/plugins/hoster/XFileSharingPro.py
@@ -23,7 +23,7 @@ from urlparse import urlparse
from pycurl import FOLLOWLOCATION, LOW_SPEED_TIME
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, PluginParseError
from module.plugins.ReCaptcha import ReCaptcha
-from module.plugins.internal.CaptchaService import SolveMedia, AdsCaptcha
+from module.plugins.internal.CaptchaService import SolveMedia
from module.utils import html_unescape
class XFileSharingPro(SimpleHoster):
@@ -35,10 +35,10 @@ class XFileSharingPro(SimpleHoster):
__name__ = "XFileSharingPro"
__type__ = "hoster"
__pattern__ = r"^unmatchable$"
- __version__ = "0.17"
+ __version__ = "0.18"
__description__ = """XFileSharingPro common hoster base"""
- __author_name__ = ("zoidberg")
- __author_mail__ = ("zoidberg@mujmail.cz")
+ __author_name__ = ("zoidberg", "stickell")
+ __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")
FILE_NAME_PATTERN = r'<input type="hidden" name="fname" value="(?P<N>[^"]+)"'
FILE_SIZE_PATTERN = r'You have requested <font color="red">[^<]+</font> \((?P<S>[^<]+)\)</font>'
@@ -151,7 +151,8 @@ class XFileSharingPro(SimpleHoster):
def handlePremium(self):
self.html = self.load(self.pyfile.url, post = self.getPostParameters())
found = re.search(self.DIRECT_LINK_PATTERN, self.html)
- if not found: self.parseError('DIRECT LINK')
+ if not found:
+ self.parseError('DIRECT LINK')
self.startDownload(found.group(1))
def handleOverriden(self):
@@ -183,13 +184,17 @@ class XFileSharingPro(SimpleHoster):
found = re.search(self.OVR_DOWNLOAD_LINK_PATTERN, self.html)
if not found: self.parseError('DIRECT LINK (OVR)')
self.pyfile.url = found.group(1)
- self.retry()
+ header = self.load(self.pyfile.url, just_header=True)
+ if 'location' in header: # Direct link
+ self.startDownload(self.pyfile.url)
+ else:
+ self.retry()
def startDownload(self, link):
link = link.strip()
if self.captcha: self.correctCaptcha()
self.logDebug('DIRECT LINK: %s' % link)
- self.download(link)
+ self.download(link, disposition=True)
def checkErrors(self):
found = re.search(self.ERROR_PATTERN, self.html)