diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-08 10:30:57 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-08 10:30:57 +0200 |
commit | 862ac360a13c5cf751a6079c56d6c2e9e5aefaeb (patch) | |
tree | 0dea175126be8150d2275f303f81ffb3fe38cbc9 | |
parent | Fix https://github.com/pyload/pyload/issues/1459 (2) (diff) | |
download | pyload-862ac360a13c5cf751a6079c56d6c2e9e5aefaeb.tar.xz |
[SexuriaCom] Update
-rw-r--r-- | module/plugins/crypter/SexuriaCom.py | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index 80c06d599..b2101e92a 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Crypter import Crypter class SexuriaCom(Crypter): __name__ = "SexuriaCom" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl_links_\d+_\d+\.html|id=\d+\&part=\d+\&link=\d+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -19,13 +19,13 @@ class SexuriaCom(Crypter): __authors__ = [("NETHead", "NETHead.AT.gmx.DOT.net")] - PATTERN_SUPPORTED_MAIN = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?Pornos_Kostenlos_.+?_(\d+)\.html', re.I) - PATTERN_SUPPORTED_CRYPT = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?dl_links_\d+_(?P<ID>\d+)\.html', re.I) - PATTERN_SUPPORTED_REDIRECT = re.compile(r'http://(www\.)?sexuria\.com/out\.php\?id=(?P<ID>\d+)\&part=\d+\&link=\d+', re.I) - PATTERN_TITLE = re.compile(r'<title> - (?P<TITLE>.*) Sexuria - Kostenlose Pornos - Rapidshare XXX Porn</title>', re.I) - PATTERN_PASSWORD = re.compile(r'<strong>Passwort: </strong></div></td>.*?bgcolor="#EFEFEF">(?P<PWD>.*?)</td>', re.I | re.S) - PATTERN_DL_LINK_PAGE = re.compile(r'"(dl_links_\d+_\d+\.html)"', re.I) - PATTERN_REDIRECT_LINKS = re.compile(r'value="(http://sexuria\.com/out\.php\?id=\d+\&part=\d+\&link=\d+)" readonly', re.I) + PATTERN_SUPPORTED_MAIN = r'http://(www\.)?sexuria\.com/(v1/)?Pornos_Kostenlos_.+?_(\d+)\.html' + PATTERN_SUPPORTED_CRYPT = r'http://(www\.)?sexuria\.com/(v1/)?dl_links_\d+_(?P<ID>\d+)\.html' + PATTERN_SUPPORTED_REDIRECT = r'http://(www\.)?sexuria\.com/out\.php\?id=(?P<ID>\d+)\&part=\d+\&link=\d+' + PATTERN_TITLE = r'<title> - (?P<TITLE>.*) Sexuria - Kostenlose Pornos - Rapidshare XXX Porn</title>' + PATTERN_PASSWORD = r'<strong>Passwort: </strong></div></td>.*?bgcolor="#EFEFEF">(?P<PWD>.*?)</td>' + PATTERN_DL_LINK_PAGE = r'"(dl_links_\d+_\d+\.html)"' + PATTERN_REDIRECT_LINKS = r'value="(http://sexuria\.com/out\.php\?id=\d+\&part=\d+\&link=\d+)" readonly' def decrypt(self, pyfile): @@ -40,49 +40,49 @@ class SexuriaCom(Crypter): def decryptLinks(self, url): linklist = [] - name = self.package.name - folder = self.package.folder + name = self.package.name + folder = self.package.folder password = None - if re.match(self.PATTERN_SUPPORTED_MAIN, url): + if re.match(self.PATTERN_SUPPORTED_MAIN, url, re.I): # Processing main page html = self.load(url) - links = re.findall(self.PATTERN_DL_LINK_PAGE, html) + links = re.findall(self.PATTERN_DL_LINK_PAGE, html, re.I) for link in links: linklist.append("http://sexuria.com/v1/" + link) - elif re.match(self.PATTERN_SUPPORTED_REDIRECT, url): + elif re.match(self.PATTERN_SUPPORTED_REDIRECT, url, re.I): # Processing direct redirect link (out.php), redirecting to main page - id = re.search(self.PATTERN_SUPPORTED_REDIRECT, url).group('ID') + id = re.search(self.PATTERN_SUPPORTED_REDIRECT, url, re.I).group('ID') if id: linklist.append("http://sexuria.com/v1/Pornos_Kostenlos_liebe_%s.html" % id) - elif re.match(self.PATTERN_SUPPORTED_CRYPT, url): + elif re.match(self.PATTERN_SUPPORTED_CRYPT, url, re.I): # Extract info from main file - id = re.search(self.PATTERN_SUPPORTED_CRYPT, url).group('ID') + id = re.search(self.PATTERN_SUPPORTED_CRYPT, url, re.I).group('ID') html = self.load("http://sexuria.com/v1/Pornos_Kostenlos_info_%s.html" % id, decode=True) - title = re.search(self.PATTERN_TITLE, html).group('TITLE').strip() + title = re.search(self.PATTERN_TITLE, html, re.I).group('TITLE').strip() if title: name = folder = title self.logDebug("Package info found, name [%s] and folder [%s]" % (name, folder)) - pwd = re.search(self.PATTERN_PASSWORD, html).group('PWD') - if pwd: + pwd = re.search(self.PATTERN_PASSWORD, html, re.I | re.S).group('PWD') + if pwd and pwd not in ("Kein Passwort", "-"): password = pwd.strip() self.logDebug("Password info [%s] found" % password) # Process link (dl_link) html = self.load(url) - links = re.findall(self.PATTERN_REDIRECT_LINKS, html) + links = re.findall(self.PATTERN_REDIRECT_LINKS, html, re.I) if len(links) == 0: - self.LogError("Broken for link %s" % link) + self.logError("Broken for link %s" % link) else: for link in links: link = link.replace("http://sexuria.com/", "http://www.sexuria.com/") finallink = self.load(link, just_header=True)['location'] if not finallink or "sexuria.com/" in finallink: - self.LogError("Broken for link %s" % link) + self.logError("Broken for link %s" % link) else: linklist.append(finallink) |