diff options
| author | 2013-07-22 20:50:34 +0200 | |
|---|---|---|
| committer | 2013-07-22 21:20:06 +0200 | |
| commit | aaaf5a4cddec894aacd7400c59a9f2f5e710362f (patch) | |
| tree | 9d9e89aff86598b3ffcc86117abd554b193e28b5 /pyload/plugins/hoster/FourSharedCom.py | |
| parent | implemented media type filter (diff) | |
| download | pyload-aaaf5a4cddec894aacd7400c59a9f2f5e710362f.tar.xz | |
Fixed PEP 8 violations in Hosters
(cherry picked from commit 2edeee0532ec6d6b4b26fd045a5971f67ca455da)
Conflicts:
	pyload/plugins/hoster/BasePlugin.py
	pyload/plugins/hoster/MultishareCz.py
	pyload/plugins/hoster/NetloadIn.py
	pyload/plugins/hoster/PremiumizeMe.py
	pyload/plugins/hoster/RapidshareCom.py
Diffstat (limited to 'pyload/plugins/hoster/FourSharedCom.py')
| -rw-r--r-- | pyload/plugins/hoster/FourSharedCom.py | 22 | 
1 files changed, 13 insertions, 9 deletions
| diff --git a/pyload/plugins/hoster/FourSharedCom.py b/pyload/plugins/hoster/FourSharedCom.py index 518ae2ae6..6b3e33284 100644 --- a/pyload/plugins/hoster/FourSharedCom.py +++ b/pyload/plugins/hoster/FourSharedCom.py @@ -1,9 +1,11 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo  import re +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + +  class FourSharedCom(SimpleHoster):      __name__ = "FourSharedCom"      __type__ = "hoster" @@ -18,7 +20,7 @@ class FourSharedCom(SimpleHoster):      FILE_OFFLINE_PATTERN = 'The file link that you requested is not valid\.|This file was deleted.'      FILE_NAME_REPLACEMENTS = [(r"&#(\d+).", lambda m: unichr(int(m.group(1))))]      FILE_SIZE_REPLACEMENTS = [(",", "")] -     +      DOWNLOAD_BUTTON_PATTERN = 'id="btnLink" href="(.*?)"'      FID_PATTERN = 'name="d3fid" value="(.*?)"'      DOWNLOAD_URL_PATTERN = r'name="d3link" value="(.*?)"' @@ -26,28 +28,30 @@ class FourSharedCom(SimpleHoster):      def handleFree(self):          if not self.account:              self.fail("User not logged in") -     +          found = re.search(self.DOWNLOAD_BUTTON_PATTERN, self.html)          if found:              link = found.group(1)          else:              link = re.sub(r'/(download|get|file|document|photo|video|audio)/', r'/get/', self.pyfile.url) -                    +          self.html = self.load(link) -                 +          found = re.search(self.DOWNLOAD_URL_PATTERN, self.html) -        if not found: self.parseError('Download link') +        if not found: +            self.parseError('Download link')          link = found.group(1) -         +          try:              found = re.search(self.FID_PATTERN, self.html)              response = self.load('http://www.4shared.com/web/d2/getFreeDownloadLimitInfo?fileId=%s' % found.group(1))              self.logDebug(response)          except:              pass -         +          self.setWait(20)          self.wait()          self.download(link) -getInfo = create_getInfo(FourSharedCom)            
\ No newline at end of file + +getInfo = create_getInfo(FourSharedCom) | 
