diff options
| author | 2014-04-18 16:08:02 +0200 | |
|---|---|---|
| committer | 2014-04-18 16:08:02 +0200 | |
| commit | b599ed263da76a58ad80c68be46c51c9fb89a1d1 (patch) | |
| tree | ca55925fff3a1c118a8cbbf8eb8f65de0ba65740 | |
| parent | Egofiles: fixed #583 (diff) | |
| download | pyload-b599ed263da76a58ad80c68be46c51c9fb89a1d1.tar.xz | |
Using in instead of has_key
| -rw-r--r-- | module/plugins/hoster/EgoFilesCom.py | 4 | ||||
| -rw-r--r-- | module/plugins/hoster/UlozTo.py | 6 | 
2 files changed, 5 insertions, 5 deletions
| diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index d8168c980..68a95b33a 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -27,7 +27,7 @@ class EgoFilesCom(SimpleHoster):      __name__ = "EgoFilesCom"      __type__ = "hoster"      __pattern__ = r'https?://(?:www\.)?egofiles.com/(\w+)' -    __version__ = "0.14" +    __version__ = "0.15"      __description__ = """Egofiles.com hoster plugin"""      __author_name__ = "stickell"      __author_mail__ = "l.stickell@yahoo.it" @@ -83,7 +83,7 @@ class EgoFilesCom(SimpleHoster):      def handlePremium(self):          header = self.load(self.pyfile.url, just_header=True) -        if header.has_key('location'): +        if 'location' in header:              self.logDebug('DIRECT LINK from header: ' + header['location'])              self.download(header['location'])          else: diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 5d03eb716..ea0c70fec 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -30,7 +30,7 @@ class UlozTo(SimpleHoster):      __name__ = "UlozTo"      __type__ = "hoster"      __pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj.cz|zachowajto.pl)/(?:live/)?(?P<id>\w+/[^/?]*)' -    __version__ = "0.96" +    __version__ = "0.97"      __description__ = """Uloz.to hoster plugin"""      __author_name__ = "zoidberg"      __author_mail__ = "zoidberg@mujmail.cz" @@ -97,7 +97,7 @@ class UlozTo(SimpleHoster):          self.logDebug('inputs.keys() = ' + str(inputs.keys()))          # get and decrypt captcha -        if inputs.has_key('captcha_value') and inputs.has_key('captcha_id') and inputs.has_key('captcha_key'): +        if all(key in inputs for key in ('captcha_value', 'captcha_id', 'captcha_key')):              # Old version - last seen 9.12.2013              self.logDebug('Using "old" version') @@ -106,7 +106,7 @@ class UlozTo(SimpleHoster):              inputs.update({'captcha_id': inputs['captcha_id'], 'captcha_key': inputs['captcha_key'], 'captcha_value': captcha_value}) -        elif inputs.has_key("captcha_value") and inputs.has_key("timestamp") and inputs.has_key("salt") and inputs.has_key("hash"): +        elif all(key in inputs for key in ('captcha_value', 'timestamp', 'salt', 'hash')):              # New version - better to get new parameters (like captcha reload) because of image url - since 6.12.2013              self.logDebug('Using "new" version') | 
