diff options
author | Stefano <l.stickell@yahoo.it> | 2014-04-18 16:08:02 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2014-04-21 17:23:16 +0200 |
commit | 377a77bdd0a5aa8a367d4819258024265fe0b386 (patch) | |
tree | 498d8bab936722ddbee130d4a87aefba8873918b | |
parent | Egofiles: fixed #583 (diff) | |
download | pyload-377a77bdd0a5aa8a367d4819258024265fe0b386.tar.xz |
Using in instead of has_key
(cherry picked from commit b599ed263da76a58ad80c68be46c51c9fb89a1d1)
-rw-r--r-- | pyload/plugins/hoster/EgoFilesCom.py | 4 | ||||
-rw-r--r-- | pyload/plugins/hoster/UlozTo.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/pyload/plugins/hoster/EgoFilesCom.py b/pyload/plugins/hoster/EgoFilesCom.py index d8168c980..68a95b33a 100644 --- a/pyload/plugins/hoster/EgoFilesCom.py +++ b/pyload/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/pyload/plugins/hoster/UlozTo.py b/pyload/plugins/hoster/UlozTo.py index 5d03eb716..ea0c70fec 100644 --- a/pyload/plugins/hoster/UlozTo.py +++ b/pyload/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') |