summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-28 22:29:40 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-28 22:29:40 +0100
commita85526b5a3b1683b928ecfe9d93ec953dc29dae7 (patch)
treee1b8f35b2844a5cd9e51d37e8ceb02c37edce369 /module
parent[SimpleHoster] Fix deprecated method getFileInfo (diff)
downloadpyload-a85526b5a3b1683b928ecfe9d93ec953dc29dae7.tar.xz
[SimpleHoster] Improve getInfo routine
Diffstat (limited to 'module')
-rw-r--r--module/plugins/internal/SimpleHoster.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index d74da1301..529abce9a 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -126,7 +126,7 @@ def _getDirectLink(self, url):
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "0.63"
+ __version__ = "0.64"
__pattern__ = r'^unmatchable$'
@@ -224,13 +224,19 @@ class SimpleHoster(Hoster):
except:
pass
- for pattern in ("INFO_PATTERN", "NAME_PATTERN", "SIZE_PATTERN",
- "FILE_INFO_PATTERN", "FILE_NAME_PATTERN", "FILE_SIZE_PATTERN"): #@TODO: Remove in 0.4.10
+ for pattern in ("FILE_INFO_PATTERN", "INFO_PATTERN",
+ "FILE_NAME_PATTERN", "NAME_PATTERN",
+ "FILE_SIZE_PATTERN", "SIZE_PATTERN"): #@TODO: Remove old patterns starting with "FILE_" in 0.4.10
try:
attr = getattr(cls, pattern)
- info.update(re.search(attr, html).groupdict())
+ dict = re.search(attr, html).groupdict()
+
+ if all(True for k in dict if k not in info):
+ info.update(dict)
+
except AttributeError:
continue
+
else:
online = True