def listURL_dramaq(req, url): if re.search(r'php', url): meta.findFrame(req, url) elif re.search(r'(biz|jp/|us/|cn/)$', url): meta.findPage(req, url) for m in re.finditer(r'<a class="mod-articles-category-title " href="([^"]*)">([^"]*)</a>', load(url)): if m.group(1)[-1] == '/': addPage(req, 'http://www.dramaq.biz'+m.group(1), m.group(2)) else: for m in re.finditer(r'<li class="item-751"><a href="([^.]*).php"', load(url)): if re.search(r'ep', m.group(1)): link, title = url+m.group(1)+'.php', m.group(1) addPage(req, link, title)
def listURL_bilibili(req, url): if re.search(r'page=', url): meta.findPage(req, url) return txt = load(url) match = re.search(r'<select id=\'dedepagetitles\' .*?</select>', txt, re.DOTALL) if match: for m in re.finditer(r'<option value=\'([^\']*)\'>([^<]*)</option>', match.group(0)): addVideo(req, 'http://www.bilibili.com'+m.group(1), m.group(2)) else: image = re.search(r'<img src="([^"]*)"', txt) if image: addVideo(req, url, url, image.group(1)) else: addVideo(req, url, url)
def listURL_adult_dodova(req, url): if url.endswith('/'): meta.findLink(req, url) else: meta.findPage(req, url, True)
def search_bi(req, q): url = 'http://search.bilibili.com/video?keyword=%s&order=click' %(urllib.quote(q)) meta.findPage(req, url, True)