def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info() itemlist = [] invert = "" if "video_url_text" in data: patron = '(?:video_url|video_alt_url|video_alt_url[0-9]*):\s*(?:\'|")([^\,]+)(?:\'|").*?' patron += '(?:video_url_text|video_alt_url_text|video_alt_url[0-9]*_text):\s*(?:\'|")([^\,]+)(?:\'|")' else: patron = 'video_url:\s*(?:\'|")([^\,]+)(?:\'|").*?' patron += 'postfix:\s*(?:\'|")([^\,]+)(?:\'|")' matches = re.compile(patron, re.DOTALL).findall(data) for url, quality in matches: if not "?login" in url and not "signup" in url: if "function/" in url: url = decode(url, license_code) elif url.startswith("/get_file/"): url = urlparse.urljoin(page_url, url) url += "|verifypeer=false" # logger.debug(quality + " -- " + url) itemlist.append(['[ktplayer] %s' % quality, url]) if "LQ" in quality: invert = "true" if invert: itemlist.reverse() return itemlist
def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info() return [["[vidbull]", decode(video_url, license_code)]]
def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info() d = video_url.split("/")[1:] logger.debug(d) return [["[vipporns]", decode(video_url, license_code)]]
def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info() itemlist = [] data = httptools.downloadpage(page_url).data if "video_url_text" in data: patron = '(?:video_url|video_alt_url|video_alt_url[0-9]*):\s*\'([^\']+)\'.*?' patron += '(?:video_url_text|video_alt_url_text|video_alt_url[0-9]*_text):\s*\'([^\']+)\'' else: patron = 'video_url:\s*\'([^\']+)\'.*?' patron += 'postfix:\s*\'([^\']+)\'' matches = re.compile(patron, re.DOTALL).findall(data) for url, quality in matches: if not "?login" in url: if "function/" in url: url = decode(url, license_code) itemlist.append(['%s' % quality, url]) return itemlist
def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info() itemlist = [] if "video_url_text" in data: patron = '(?:video_url|video_alt_url|video_alt_url[0-9]*):\s*(?:\'|")([^\,]+)(?:\'|").*?' patron += '(?:video_url_text|video_alt_url_text|video_alt_url[0-9]*_text):\s*(?:\'|")([^\,]+)(?:\'|")' else: patron = 'video_url:\s*(?:\'|")([^\,]+)(?:\'|").*?' patron += 'postfix:\s*(?:\'|")([^\,]+)(?:\'|")' matches = re.compile(patron, re.DOTALL).findall(data) for url, quality in matches: if not "?login" in url and not "signup" in url: if "function/" in url: url = decode(url, license_code) url += "|verifypeer=false" itemlist.append(['%s' % quality, url]) return itemlist
def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info() video_urls = [] invert = "" url = "" if "video_url_text" in data: patron = '(?:video_url|video_alt_url|video_alt_url[0-9]*):\s*(?:\'|")([^\,]+)(?:\'|").*?' patron += '(?:video_url_text|video_alt_url_text|video_alt_url[0-9]*_text):\s*(?:\'|")([^\,]+)(?:\'|")' else: patron = 'video_url:\s*(?:\'|")([^\,]+)(?:\'|").*?' patron += 'postfix:\s*(?:\'|")([^\,]+)(?:\'|")' matches = re.compile(patron, re.DOTALL).findall(data) for url, quality in matches: if not "?login" in url and not "signup" in url: if "function/" in url: url = decode(url, license_code) elif url.startswith("/get_file/"): url = urlparse.urljoin(page_url, url) # url = httptools.downloadpage(url).url # url = httptools.downloadpage(url, follow_redirects=False).headers["location"] # url += "|verifypeer=false" # logger.debug(quality + " -- " + url) video_urls.append(['[ktplayer] %s' % quality, url]) if "LQ" in quality: invert = "true" if invert: video_urls.reverse() if not url: url = scrapertools.find_single_match( data, '(?:video_url|video_alt_url|video_alt_url[0-9]*):\s*(?:\'|")([^\,]+)(?:\'|").*?' ) video_urls.append(['[ktplayer]', url]) return video_urls