def parse_cb(page, options): result = parse_flvcd_page(page, None) if options & moonplayer.OPT_DOWNLOAD: moonplayer.warn(warning_msg) moonplayer.download(result, result[0]) else: moonplayer.play(result)
def parse_cb(page, data): (options, url) = data result = parse_flvcd_page(page, None) if len(result) == 0: moonplayer.warn("Cannot parse bilibili's video!") elif options & moonplayer.OPT_DOWNLOAD and len(result) > 2: moonplayer.download(result, result[0]) else: moonplayer.get_url(url, parse_danmaku_cb, (options, result))
def parse_cb(page, data): (options, url) = data result = parse_flvcd_page(page, None) if 'play#' in url: post_data = 'episode_id=' + url.split('#')[-1] api_url = 'http://bangumi.bilibili.com/web_api/get_source' moonplayer.post_content(api_url, post_data, parse_danmaku_cb, (options, result, url)) else: moonplayer.download_page(url, parse_danmaku_cb, (options, result, url))
def parse_cb(page, options): result = parse_flvcd_page(page, None) if options & moonplayer.OPT_DOWNLOAD: try: process_redirections(result) moonplayer.download(result, result[0]) except: moonplayer.warn("Network error") else: moonplayer.play(result)
def parse_cb(page, options): result = parse_flvcd_page(page, None) if options & moonplayer.OPT_DOWNLOAD: try: process_redirections(result) moonplayer.download(result, result[0]) except: moonplayer.warn('Network error') else: moonplayer.play(result)
def parse_cb(page, data): options = data[0] url = data[1] result = parse_flvcd_page(page, None) if len(result) == 0: moonplayer.warn('Cannot parse this video:\n' + url) elif options & moonplayer.OPT_DOWNLOAD: if len(result) == 2: # single clip moonplayer.download(result) else: moonplayer.download(result, result[0]) else: moonplayer.get_url(url, parse_danmaku_cb, result)
def parse_cb(page, data): options = data[0] url = data[1] match = cantonese_re.search(page) if match and not '_lang=1' in moonplayer.final_url: if moonplayer.question('是否解析为粤语版?'): url = match.group(1) if not url.startswith('http://'): url = 'http://www.flvcd.com/' + url url += '&go=1' moonplayer.get_url(url, parse_cb, data) return result = parse_flvcd_page(page, None) if len(result) == 0: moonplayer.warn('Cannot parse this video:\n' + url) elif options & moonplayer.OPT_DOWNLOAD: moonplayer.download(result, result[0]) else: moonplayer.play(result)
def parse_cb(page, data): (options, url) = data result = parse_flvcd_page(page, None) moonplayer.get_url(url, parse_danmaku_cb, (options, result, url))
def parse_cb(page, data): options, url = data result = parse_flvcd_page(page, None) moonplayer.download_page(url, parse_danmaku_cb, (options, result, url))
def parse_cb(page, options): result = parse_flvcd_page(page, None) if options & moonplayer.OPT_DOWNLOAD: moonplayer.download(result, result[0]) else: moonplayer.play(result)