From cb7bb3881a76e85110868643be04d200113d88f2 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 18 Sep 2011 19:04:05 +0200 Subject: plugin pack by zoidberg --- module/plugins/accounts/HellshareCz.py | 54 +++++++++ module/plugins/crypter/LinkdecrypterCom.py | 83 ++++++++++++++ module/plugins/crypter/MultiloadCz.py | 41 +++++++ module/plugins/hoster/BezvadataCz.py | 66 +++++++++++ module/plugins/hoster/CzshareCom.py | 173 +++++++++++++++++++++++++++++ module/plugins/hoster/DataportCz.py | 77 +++++++++++++ module/plugins/hoster/EdiskCz.py | 88 +++++++++++++++ module/plugins/hoster/EuroshareEu.py | 71 ++++++++++++ module/plugins/hoster/FlyshareCz.py | 90 +++++++++++++++ module/plugins/hoster/HellshareCz.py | 161 +++++++++++++++++++++++++++ module/plugins/hoster/MultishareCz.py | 83 ++++++++++++++ module/plugins/hoster/NahrajCz.py | 54 +++++++++ module/plugins/hoster/PrzeklejPl.py | 47 ++++++++ module/plugins/hoster/QuickshareCz.py | 100 +++++++++++++++++ module/plugins/hoster/SpeedfileCz.py | 80 +++++++++++++ module/plugins/hoster/StahnuTo.py | 97 ++++++++++++++++ module/plugins/hoster/UlozTo.py | 167 ++++++++++++++++++++++++++++ module/plugins/hoster/UloziskoSk.py | 95 ++++++++++++++++ 18 files changed, 1627 insertions(+) create mode 100644 module/plugins/accounts/HellshareCz.py create mode 100644 module/plugins/crypter/LinkdecrypterCom.py create mode 100644 module/plugins/crypter/MultiloadCz.py create mode 100644 module/plugins/hoster/BezvadataCz.py create mode 100644 module/plugins/hoster/CzshareCom.py create mode 100644 module/plugins/hoster/DataportCz.py create mode 100644 module/plugins/hoster/EdiskCz.py create mode 100644 module/plugins/hoster/EuroshareEu.py create mode 100644 module/plugins/hoster/FlyshareCz.py create mode 100644 module/plugins/hoster/HellshareCz.py create mode 100644 module/plugins/hoster/MultishareCz.py create mode 100644 module/plugins/hoster/NahrajCz.py create mode 100644 module/plugins/hoster/PrzeklejPl.py create mode 100644 module/plugins/hoster/QuickshareCz.py create mode 100644 module/plugins/hoster/SpeedfileCz.py create mode 100644 module/plugins/hoster/StahnuTo.py create mode 100644 module/plugins/hoster/UlozTo.py create mode 100644 module/plugins/hoster/UloziskoSk.py (limited to 'module') diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py new file mode 100644 index 000000000..eb44ee47f --- /dev/null +++ b/module/plugins/accounts/HellshareCz.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- + +""" + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + @author: zoidberg +""" + +from module.plugins.Account import Account +import re + +class HellshareCz(Account): + __name__ = "HellshareCz" + __version__ = "0.1" + __type__ = "account" + __description__ = """hellshare.cz account plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + CREDIT_LEFT_PATTERN = r'([^<]+)' + + def loadAccountInfo(self, user, req): + self.relogin(user) + html = req.load("http://www.hellshare.com/") + + found = re.search(self.CREDIT_LEFT_PATTERN, html) + if found is None: + credits = 0 + else: + credits = int(found.group(1)) * 1024 + + return {"validuntil": -1, "trafficleft": credits} + + def login(self, user, data, req): + + html = req.load('http://www.hellshare.com/login?do=loginForm-submit', post={ + "login": "Log in", + "password": data["password"], + "username": user + }) + + if "

You input a wrong user name or wrong password

" in html: + self.wrongPassword() diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py new file mode 100644 index 000000000..befbfe4e6 --- /dev/null +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +""" + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + @author: zoidberg +""" + +import re +from module.plugins.Crypter import Crypter + +class LinkdecrypterCom(Crypter): + __name__ = "LinkdecrypterCom" + __type__ = "crypter" + __pattern__ = r"http://(\w*\.)?(10001mb\.com|123link\.it|1cl\.in|1kh\.de|1zh\.us|2joy\.de|2so\.be|3\.ly|5\.gp|6nc\.net|7li\.in|9\.bb|adf\.ly|adflav\.com|adfoc\.us|allanalpass\.com|alturl\.com|amy\.gs|any\.gs|apurl\.ru|aurl\.es|b23\.ru|baberepublic\.com|bat5\.com|bax\.li|beam\.to|bit\.ly|blu\.cc|c\.ly|capourl\.com|cc\.st|cd\.vg|cloneurl\.com|convertircodigo\.com|crypt-it\.com|crypt\.to|cryptlink\.ws|deb\.gs|digzip\.com|djurl\.com|dl-protect\.com|dl\.dropbox\.com|doiop\.com|ehe\.me|embedupload\.com|encript\.in|encurtador\.com|enlacs\.com|evg\.in|extreme-protect\.com|fa\.by|faja\.me|fapoff\.com|fdnlinks\.com|fea\.me|fff\.to|filedeck\.net|filemirrorupload\.com|fileupster\.com|flameupload\.com|freetexthost\.com|fwd4\.me|fyad\.org|goandgrab\.info|goblig\.com|goo\.gl|h-url\.in|hasurl\.co\.cc|hide-url\.net|hidemyass\.com|hides\.at|hideurl\.biz|ho\.io|hornywood\.tv|href\.hu|id2\.tryjav\.com|ilix\.in|ily\.me|ino\.me|interupload\.com|is\.gd|ivpaste\.com|j\.mp|je\.pl|jheberg\.com|just\.as|kickupload\.com|klnk\.de|knoffl\.com|kodo\.ameoto\.com|ks\.gs|latwy\.pl|link-go\.info|link-protector\.com|link-safe\.net|link4jo\.com|linkanonimo\.com|linkbabes\.com|linkbank\.eu|linkbee\.com|linkblur\.com|linkbucks\.com|linkcrypt\.com|linkcrypt\.ws|linkencrypter\.com|linkhide\.com\.ar|linkhide\.in|linkoculto\.net|linkok\.org|linkprivado\.com|linkprivate\.net|linkprotect\.in|links-protect\.com|links-protect\.info|links\.tc|linksafe\.me|linksaver\.info|linkse\.info|linkseguro\.com\.ar|linkseguro\.org|linksole\.com|linksprotegidos\.info|linkto\.net|linkweb\.dk|linkx\.in|linkzip\.net|listedfiles\.com|littleurl\.net|lixk\.me|ljv2\.com|ll11\.org|lnk\.cm|lnk\.co|longr\.us|lovelink\.in|mcaf\.ee|megaline\.co|megaupper\.com|mhz\.me|migre\.me|miniurls\.co|minu\.me|mir\.cr|mirrorcreator\.com|mo\.by|multi-uploadeur\.com|multiupload\.com|murl\.kz|musicalmente\.info|mypaqe\.com|mypl\.us|myrapidlinks\.com|myref\.de|myurl\.in|nbanews\.us|okconsolas\.com|oneddl\.canhaz\.it|ow\.ly|p4p\.com\.es|p6l\.org|paste\.frubar\.net|paste\.hotfile-bb\.com|paste\.ubuntu\.com|paste2\.org|paste21\.info|pastebin\.com|paylesssofts\.net|poontown\.net|pqueno\.com|priva\.us|protec-link\.com|protect-ddl\.com|protect-my-links\.com|protected\.socadvnet\.com|protectlinks\.com|protectlinks\.net|protectlk\.com|protege-mes-liens\.com|ptl\.li|qooy\.com|qqc\.co|qvvo\.com|rapidfolder\.com|rapidsafe\.de|rapidsafe\.org|rapidshare\.mu|realfiles\.net|redir\.ec|ref\.so|relinka\.net|rexwo\.com|rqq\.co|rs-layer\.com|rsmonkey\.com|s2l\.biz|saf\.li|safe\.mn|safelinking\.net|saferlinks\.com|sealed\.in|seclnk\.in|seriousfiles\.com|sharebee\.com|short-link\.fr|shortlink\.ca|shorturlscript\.net|simurl\.com|sinl\.es|skroc\.pl|slexy\.org|slnky\.net|smsdl\.com|sn\.im|sonofertas\.es|spedr\.com|spreadlink\.us|star-cyber\.com|subedlc\.com|subirfacil\.com|syl\.me|szort\.pl|takemyfile\.com|takemylinks\.com|textsnip\.com|thecow\.me|thesefiles\.com|tilien\.net|tiny\.cc|tiny\.lt|tinylinks\.co|tinypaste\.com|tinyurl\.com|tinyurlscript\.info|tmf\.myegy\.com|togoto\.us|tot\.to|tra\.kz|u\.to|uberpicz\.com|ulinks\.net|ultra-protect\.com|ultrafiles\.net|undeadlink\.com|uploadjockey\.com|uploadmirrors\.com|uploadonall\.com|upmirror\.com|upsafe\.org|ur\.ly|url-go\.com|url-site\.com|url4t\.com|urla\.in|urlbeat\.net|urlcash\.net|urlcrypt\.com|urlcut\.com|urlcut\.in|urldefender\.com|urln\.tk|urlpulse\.net|urlspy\.co\.cc|urwij|uselink\.info|uucc\.cc|uze\.in|wcrypt\.in|webtooljungle\.com|weepax\.com|whackyvidz\.com|x-ls\.ru|x\.co|xa\.ly|xc\.io|xr\.com|xtreemhost\.com|xurl\.cn|xxs\.ru|ysu\.me|yyv\.co|zff\.co|zio\.in|zpag\.es)/.*" + __version__ = "0.2" + __description__ = """linkdecrypter.com""" + __author_name__ = ("zoidberg") + + TEXTAREA_PATTERN = r'' + PASSWORD_PATTERN = r'

PASSWORD:

' + CAPTCHA_PATTERN = r'Loading CAPTCHA...' + + def decrypt(self, pyfile): + self.html = self.load('http://linkdecrypter.com', post={ + "link_cache": "on", + "links": self.pyfile.url, + "modo_links": "text" + }) + + new_links = [] + captcha = '' + passwords = self.getPassword().split() + + for i in range(5 + len(passwords)): + self.logDebug("Trying to decrypt #" + str(i)) + self.html = self.load('http://linkdecrypter.com') + + textarea = re.search(self.TEXTAREA_PATTERN, self.html, flags=re.DOTALL) + if textarea is not None: + self.logDebug(textarea.group(1)) + new_links.extend(textarea.group(1).split()) + break + elif re.search(self.PASSWORD_PATTERN, self.html): + if len(passwords): + password = passwords.pop(0) + self.logInfo("Password protected link, trying " + password) + self.html = self.load('http://linkdecrypter.com', post={ + "password": password + }) + else: + self.fail("No or incorrect password") + else: + found = re.search(self.CAPTCHA_PATTERN, self.html) + if found is not None: + self.logInfo("Captcha protected link") + if captcha: + self.invalidCaptcha() + captcha = self.decryptCaptcha(url='http://linkdecrypter.com/' + found.group(1)) + self.html = self.load('http://linkdecrypter.com', post={ + "captcha": captcha + }) + else: + self.fail('Max retries reached') + + if new_links: + if captcha: + self.correctCaptcha() + self.core.files.addLinks(new_links, self.pyfile.package().id) + else: + self.fail('Could not extract any links') + + \ No newline at end of file diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py new file mode 100644 index 000000000..f34bb3483 --- /dev/null +++ b/module/plugins/crypter/MultiloadCz.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + +import re +from module.plugins.Crypter import Crypter + +class MultiloadCz(Crypter): + __name__ = "MultiloadCz" + __type__ = "crypter" + __pattern__ = r"http://.*multiload.cz/(stahnout|slozka)/.*" + __version__ = "0.2b" + __description__ = """multiload.cz""" + __config__ = [ + ("usedHoster", "str", "Prefered hoster list (bar-separated) ", "rapidshare.com|uloz.to|quickshare.cz")] + __author_name__ = ("zoidberg") + + # LINK_PATTERN = r'

[^<]*

' + FOLDER_PATTERN = r'

]*>([^>]*)' + + def decrypt(self, pyfile): + self.html = self.load(self.pyfile.url, decode=True) + new_links = [] + + if re.search(self.__pattern__, self.pyfile.url).group(1) == "slozka": + found = re.search(self.FOLDER_PATTERN, self.html) + if found is not None: + new_links.extend(found.group(1).split()) + else: + link_pattern = re.compile(r'

(' + + self.getConfig("usedHoster") + + r')

') + + for found in re.finditer(link_pattern, self.html): + self.logDebug("ML URL:" + found.group(2)) + new_links.append(found.group(2)) + + if new_links: + self.core.files.addLinks(new_links, self.pyfile.package().id) + #self.packages.append((self.pyfile.package().name, new_links, self.pyfile.package().name)) + else: + self.fail('Could not extract any links') + \ No newline at end of file diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py new file mode 100644 index 000000000..f9784142f --- /dev/null +++ b/module/plugins/hoster/BezvadataCz.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +""" + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + @author: zoidberg +""" + +import re +from module.plugins.Hoster import Hoster + +class BezvadataCz(Hoster): + __name__ = "BezvadataCz" + __type__ = "hoster" + __pattern__ = r"http://(\w*\.)?bezvadata.cz/stahnout/.*" + __version__ = "0.1" + __description__ = """BezvaData.cz""" + __author_name__ = ("zoidberg") + + ID_PATTERN = r'' + HASH_PATTERN = r'' + FILENAME_PATTERN = r'BezvaData \| St�hnout soubor ([^<]+)' + OFFLINE_PATTERN = r'BezvaData \| Soubor nenalezen' + + def setup(self): + self.multiDL = False + + def process(self, pyfile): + self.html = self.load(pyfile.url, decode=True) + + if re.search(self.OFFLINE_PATTERN, self.html) is not None: + self.offline() + + found = re.search(self.FILENAME_PATTERN, self.html) + if found is None: + self.fail("Parse error (FILENAME)") + pyfile.name = found.group(1) + + found = re.search(self.ID_PATTERN, self.html) + if found is None: + self.fail("Parse error (ID)") + souborId = found.group(1) + + found = re.search(self.ID_PATTERN, self.html) + if found is None: + self.fail("Parse error (HASH)") + souborHash = found.group(1) + + self.logDebug("URL:" + pyfile.url + " ID:" + souborId + " HASH:" + souborHash) + + self.download(pyfile.url, post={ + "souborId": souborId, + "souborHash": souborHash, + "_send": 'STAHNOUT SOUBOR' + }) + \ No newline at end of file diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py new file mode 100644 index 000000000..8cab02317 --- /dev/null +++ b/module/plugins/hoster/CzshareCom.py @@ -0,0 +1,173 @@ +# -*- coding: utf-8 -*- +""" + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + @author: zoidberg +""" + +import re +from module.plugins.Hoster import Hoster +from module.network.RequestFactory import getURL + +def getInfo(urls): + result = [] + + for url in urls: + html = getURL(url, decode=True) + if re.search(CzshareCom.FILE_OFFLINE_PATTERN, html): + # File offline + result.append((url, 0, 1, url)) + else: + # Get file info + found = re.search(CzshareCom.FILE_NAME_PATTERN, html) + if found is not None: + name = found.group(1) + result.append((name, 0, 2, url)) + yield result + + +class CzshareCom(Hoster): + __name__ = "CzshareCom" + __type__ = "hoster" + __pattern__ = r"http://.*czshare\.(com|cz)/.*" + __version__ = "0.6" + __description__ = """CZshare.com""" + __author_name__ = ("zoidberg") + + #FILE_URL_PATTERN = r'([^<]+)' + FILE_URL_PATTERN = r'[^>]*alt="([^"]+)" />' + FORM_PATTERN = r'

' + ID_PATTERN = r'' + FILE_PATTERN = r'' + #TICKET_PATTERN = r'' + SUBMIT_PATTERN = r'' + SIZE_PATTERN = r'' + SERVER_PATTERN = r'' + FILE_OFFLINE_PATTERN = r'

Soubor nenalezen 

' + MULTIDL_PATTERN = r"

Z[^<]*PROFI.

" + FILE_NAME_PATTERN = r'

([^<]+) 

' + + def setup(self): + self.multiDL = False + + def process(self, pyfile): + self.html = self.load(pyfile.url, decode=True) + + #marks the file as "offline" when the pattern was found on the html-page + if re.search(self.FILE_OFFLINE_PATTERN, self.html) is not None: + self.offline() + + # parse the name from the site and set attribute in pyfile + found = re.search(self.FILE_URL_PATTERN, self.html) + if found is None: + self.fail("Parse error (URL)") + + pyfile.name = found.group(2) + parsed_url = "http://czshare.com" + found.group(1) + + # get download ticket and parse html + self.logDebug("PARSED_URL:" + parsed_url) + self.logDebug("NAME:" + pyfile.name) + self.html = self.load(parsed_url) + + #if not re.search(self.FORM_PATTERN, self.html): + if re.search(self.MULTIDL_PATTERN, self.html): + self.waitForFreeSlot() + + parse_err = False + + found = re.search(self.SERVER_PATTERN, self.html) + if found is None: + parse_err = True + server = "" + else: + server = found.group(1) + + found = re.search(self.ID_PATTERN, self.html) + if found is None: + parse_err = True + file_id = "" + else: + file_id = found.group(1) + + found = re.search(self.FILE_PATTERN, self.html) + if found is None: + parse_err = True + long_id = "" + else: + long_id = found.group(1) + + found = re.search(self.SIZE_PATTERN, self.html) + if found is None: + parse_err = True + size = "" + else: + size = found.group(1) + + self.logDebug("ID:" + file_id + " F:" + long_id + " B:" + size + " S:" + server) + + if parse_err: + self.fail("Parse error") + + found = re.search(self.SUBMIT_PATTERN, self.html) + if found is None: + self.fail("Parse error (SUBMIT)") + else: + submit = found.group(1) + + # get and decrypt captcha + captcha_url = 'http://czshare.com/captcha.php' + """ + if self.getConfig("randomCaptcha") == True: + captcha = ''.join(random.choice('abcdefghijklmnopqrstuvwxyz') for i in range(5)) + else: + """ + captcha = self.decryptCaptcha(captcha_url) + self.logDebug('CAPTCHA_URL:' + captcha_url + ' CAPTCHA:' + captcha) + + """ + self.setWait(self.getConfig("multiWait"), True) + self.wait() + """ + + # download the file, destination is determined by pyLoad + #download_url = 'http://czshare.com/free.php' + self.download(parsed_url, post={ + "id": file_id, + "file": long_id, + "size": size, + "server": server, + "captchastring2": captcha, + "freedown": submit + }) + + # check download + check = self.checkDownload({ + "tempoffline": re.compile(r"^Soubor je do.asn. nedostupn.$"), + "multi_dl": re.compile(self.MULTIDL_PATTERN), + "captcha_err": re.compile(self.SUBMIT_PATTERN) + }) + + if check == "tempoffline": + self.fail("File not available - try later") + elif check == "multi_dl": + self.waitForFreeSlot() + elif check == "captcha_err": + self.invalidCaptcha() + self.retry() + + def waitForFreeSlot(self): + self.setWait(900, True) + self.wait() + self.retry() \ No newline at end of file diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py new file mode 100644 index 000000000..ea1ed1282 --- /dev/null +++ b/module/plugins/hoster/DataportCz.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +""" + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + @author: zoidberg +""" + +import re +from module.plugins.Hoster import Hoster +from module.network.RequestFactory import getURL + +def getInfo(urls): + result = [] + + for url in urls: + html = getURL(url, decode=True) + if re.search(DataportCz.FILE_OFFLINE_PATTERN, html): + # File offline + result.append((url, 0, 1, url)) + else: + # Get file info + found = re.search(DataportCz.FILE_NAME_PATTERN, html) + if found is not None: + name = found.group(1) + result.append((name, 0, 2, url)) + yield result + + +class DataportCz(Hoster): + __name__ = "DataportCz" + __type__ = "hoster" + __pattern__ = r"http://.*dataport.cz/file/.*" + __version__ = "0.3" + __description__ = """dataport.cz""" + __author_name__ = ("zoidberg") + + FILE_NAME_PATTERN = r'

([^<]+)

' + URL_PATTERN = r']*class="ui-state-default button hover ui-corner-all ">' + NO_SLOTS_PATTERN = r']*class="ui-state-default button hover ui-corner-all ui-state-disabled">' + FILE_OFFLINE_PATTERN = r'

Soubor nebyl nalezen

' + + def setup(self): + self.multiDL = False + + def process(self, pyfile): + self.html = self.load(pyfile.url, decode=True) + + if re.search(self.FILE_OFFLINE_PATTERN, self.html): + self.offline() + + if re.search(self.NO_SLOTS_PATTERN, self.html): + self.setWait(900, True) + self.wait() + self.retry() + + found = re.search(self.FILE_NAME_PATTERN, self.html) + if found is None: + self.fail("Parse error (NAME)") + pyfile.name = found.group(1) + + found = re.search(self.URL_PATTERN, self.html) + if found is None: + self.fail("Parse error (URL)") + download_url = found.group(1) + + self.download(download_url) diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py new file mode 100644 index 000000000..f5291547f --- /dev/null +++ b/module/plugins/hoster/EdiskCz.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +""" + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + @author: zoidberg +""" + +import re +from module.plugins.Hoster import Hoster +from module.network.RequestFactory import getURL + +def getInfo(urls): + result = [] + + for url in urls: + html = getURL(url, decode=True) + if re.search(EdiskCz.FILE_OFFLINE_PATTERN, html): + # File offline + result.append((url, 0, 1, url)) + else: + # Get file info + found = re.search(EdiskCz.FILE_NAME_PATTERN, html) + if found is not None: + name = found.group(1) + result.append((name, 0, 2, url)) + yield result + + +class EdiskCz(Hoster): + __name__ = "EdiskCz" + __type__ = "hoster" + __pattern__ = r"http://(\w*\.)?edisk.(cz|sk|eu)/(stahni|sk/stahni|en/download)/.*" + __version__ = "0.2" + __description__ = """Edisk.cz""" + __author_name__ = ("zoidberg") + + URL_PATTERN = r'' + FILE_NAME_PATTERN = r'' + ACTION_PATTERN = r'/en/download/(\d+/.*\.html)' + DLLINK_PATTERN = r'http://.*edisk.cz.*\.html' + FILE_OFFLINE_PATTERN = r'

This file does not exist due to one of the following: