# -*- coding: utf-8 -*- # Test links (random.bin): # http://www13.zippyshare.com/v/18665333/file.html import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" __pattern__ = r'(?Phttp://www\d{0,2}\.zippyshare.com)/v(?:/|iew.jsp.*key=)(?P\d+)' __version__ = "0.49" __description__ = """Zippyshare.com hoster plugin""" __author_name__ = ("spoob", "zoidberg", "stickell", "skylab") __author_mail__ = ("spoob@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it", "development@sky-lab.de") FILE_NAME_PATTERN = r'Zippyshare\.com - (?P<N>[^<]+)' FILE_SIZE_PATTERN = r'>Size:\s*]*>(?P[0-9.,]+) (?P[kKMG]+)i?B
' FILE_INFO_PATTERN = r'document\.getElementById\(\'dlbutton\'\)\.href = "[^;]*/(?P[^"]+)";' OFFLINE_PATTERN = r'>File does not exist on this server' SH_COOKIES = [(".zippyshare.com", "ziplocale", "en")] def setup(self): self.multiDL = True def handleFree(self): url = self.get_file_url() if not url: self.fail("Download URL not found.") self.logDebug("Download URL: %s" % url) self.download(url) def get_file_url(self): """returns the absolute downloadable filepath""" url_parts = re.search(r'(addthis:url="(http://www(\d+).zippyshare.com/v/(\d*)/file.html))', self.html) number = url_parts.group(4) check = re.search(r'