summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/BasePlugin.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-28 21:19:03 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-28 21:19:03 +0200
commit46c6fc74a4e423927554f024b78dbbbf33e982cd (patch)
treee7ff9580bb5e80b91e2bd9609409116a19c5941e /pyload/plugins/hoster/BasePlugin.py
parentApi : Add brackets and pipe to urlmatcher (diff)
parent[XFileSharingPro] Fixed typo (diff)
downloadpyload-46c6fc74a4e423927554f024b78dbbbf33e982cd.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: pyload/plugins/crypter/MultiuploadCom.py pyload/plugins/crypter/SerienjunkiesOrg.py pyload/plugins/hooks/ExternalScripts.py pyload/plugins/hooks/ExtractArchive.py pyload/plugins/hooks/MergeFiles.py pyload/plugins/hoster/CatShareNet.py pyload/plugins/hoster/FilezyNet.py pyload/plugins/hoster/IFileWs.py pyload/plugins/hoster/PremiumTo.py pyload/plugins/hoster/SpeedyshareCom.py pyload/plugins/hoster/UptoboxCom.py pyload/plugins/hoster/XFileSharingPro.py pyload/plugins/hoster/ZippyshareCom.py
Diffstat (limited to 'pyload/plugins/hoster/BasePlugin.py')
-rw-r--r--pyload/plugins/hoster/BasePlugin.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pyload/plugins/hoster/BasePlugin.py b/pyload/plugins/hoster/BasePlugin.py
index 55cdf5b88..3fdd0348d 100644
--- a/pyload/plugins/hoster/BasePlugin.py
+++ b/pyload/plugins/hoster/BasePlugin.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
-from re import match, search
+import re
+
from urllib import unquote
from urlparse import urlparse
@@ -25,10 +26,11 @@ class BasePlugin(Hoster):
self.chunkLimit = -1
self.resumeDownload = True
+
def process(self, pyfile):
"""main function"""
- #debug part, for api exerciser
+ #: debug part, for api exerciser
if pyfile.url.startswith("DEBUG_API"):
self.multiDL = False
return
@@ -74,6 +76,7 @@ class BasePlugin(Hoster):
else:
self.fail("No Plugin matched and not a downloadable url.")
+
def downloadFile(self, pyfile):
url = pyfile.url
@@ -86,7 +89,7 @@ class BasePlugin(Hoster):
if 'location' in header:
self.logDebug("Location: " + header['location'])
- base = match(r'https?://[^/]+', url).group(0)
+ base = re.match(r'https?://[^/]+', url).group(0)
if header['location'].startswith("http"):
url = header['location']
elif header['location'].startswith("/"):
@@ -100,7 +103,7 @@ class BasePlugin(Hoster):
if 'content-disposition' in header:
self.logDebug("Content-Disposition: " + header['content-disposition'])
- m = search("filename(?P<type>=|\*=(?P<enc>.+)'')(?P<name>.*)", header['content-disposition'])
+ m = re.search("filename(?P<type>=|\*=(?P<enc>.+)'')(?P<name>.*)", header['content-disposition'])
if m:
disp = m.groupdict()
self.logDebug(disp)