diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/crypter/ShareLinksBiz.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 0009253e1..1ffa5d41a 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -12,7 +12,7 @@ class ShareLinksBiz(Crypter): __name__ = "ShareLinksBiz"
__type__ = "crypter"
__pattern__ = r"(?P<base>http://[\w\.]*?(share-links|s2l)\.biz)/(?P<id>_?[0-9a-z]+)(/.*)?"
- __version__ = "1.11"
+ __version__ = "1.12"
__description__ = """Share-Links.biz Crypter"""
__author_name__ = ("fragonib")
__author_mail__ = ("fragonib[AT]yahoo[DOT]es")
@@ -152,16 +152,24 @@ class ShareLinksBiz(Crypter): self.correctCaptcha()
def getPackageInfo(self):
+ name = folder = None
+
+ # Extract from web package header
title_re = r'<h2><img.*?/>(.*)</h2>'
m = re.search(title_re, self.html, re.DOTALL)
if m is not None:
title = m.group(1).strip()
- name = folder = title
- self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder))
- else:
+ if 'unnamed' not in title:
+ name = folder = title
+ self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder))
+
+ # Fallback to defaults
+ if not name or not folder:
name = self.package.name
folder = self.package.folder
self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder))
+
+ # Return package info
return name, folder
def handleWebLinks(self):
|