コード例 #1
0
def schedule(url):
	href = "http://thvl.vn/jwplayer/?l=rtmp"
	if "THVL1" in url:
		href = "http://thvl.vn/jwplayer/?l=rtmp2"
	
	s = xsearch('(<table.+?/table>)',xread(url))
	s = [' '.join(re.sub('<.+?>',' ',i).split()) for i in re.findall('(<tr.+?/tr>)',s)]
	
	return [(i,href,"","live",False) for i in s if i]
コード例 #2
0
ファイル: thvl.py プロジェクト: vphuc81/MyRepository
def schedule1(url):
	href = "http://thvl.vn/jwplayer/?l=rtmp"
	if "THVL1" in url:
		href = "http://thvl.vn/jwplayer/?l=rtmp2"
	
	s = xsearch('(<table.+?/table>)',xread(url))
	s = [' '.join(re.sub('<.+?>',' ',i).split()) for i in re.findall('(<tr.+?/tr>)',s)]
	
	return [(i,href,"","live",False) for i in s if i]
コード例 #3
0
ファイル: thvl.py プロジェクト: vanhung1710/MyRepository
def episode(name, url, img):
    b = xread(url)

    if 'paged=' not in url and '<h3>&raquo; <a href="' not in b:
        hrefs = re.findall(
            '<a href="(http://thvl.vn/\?cat=\d+)" title="(.+?)">', b)

        if not hrefs:
            return [(namecolor(name), url, img, "live", False)]

        href = [i for i in hrefs if i[1] in name]
        if href:
            href = href[0][0]
        else:
            href = hrefs[0][0]

        b = xread(href)

    if '<h3>&raquo; <a href="' not in b:
        b = b[b.find('<div id="main-content">'):]
    else:
        b = b[b.find('<h3>&raquo; <a href="'):]

    s = re.findall('(<div class="video-clip-box".+?/div)', b, re.S)
    if not s:
        s = re.findall(
            '(<div class="post-content clearfix".+?"content clearfix">)', b,
            re.S)

    items = []
    for s in s:
        title = xsearch('class="date">([^<].+?)<', s)
        if title:
            title = '[COLOR cyan]%s[/COLOR] ' % title
        title = title + s2c(xsearch('alt="([^"].+?)"', s))
        href = xsearch('href="([^"].+?)"', s)
        img = xsearch('src="([^"].+?)"', s)
        items.append((title, fixLink(href), img, 'live', False))

    pageNext(b, items, 'eps')

    return items
コード例 #4
0
ファイル: thvl.py プロジェクト: vphuc81/MyRepository
def episode(name, url, img):
	b     = xread(url)
	
	if 'paged=' not in url and '<h3>&raquo; <a href="' not in b:
		hrefs = re.findall('<a href="(http://thvl.vn/\?cat=\d+)" title="(.+?)">',b)
		
		if not hrefs:
			return [(namecolor(name), url, img, "live", False)]

		href  = [i for i in hrefs if i[1] in name]
		if href:
			href = href[0][0]
		else:
			href = hrefs[0][0]
		
		b = xread(href)
	
	if '<h3>&raquo; <a href="' not in b:
		b = b[b.find('<div id="main-content">'):]
	else:
		b = b[b.find('<h3>&raquo; <a href="'):]
	
	s = re.findall('(<div class="video-clip-box".+?/div)',b,re.S)
	if not s:
		s = re.findall('(<div class="post-content clearfix".+?"content clearfix">)',b,re.S)
	
	items = []
	for s in s:	
		title = xsearch('class="date">([^<].+?)<',s)
		if title:
			title = '[COLOR cyan]%s[/COLOR] '%title
		title = title + s2c(xsearch('alt="([^"].+?)"',s))
		href = xsearch('href="([^"].+?)"',s)
		img = xsearch('src="([^"].+?)"',s)
		items.append((title, fixLink(href), img, 'live', False))
	
	pageNext(b, items, 'eps')
	
	return items
コード例 #5
0
ファイル: thvl.py プロジェクト: vphuc81/MyRepository
def pageNext(b, items, query):
	s    = xsearch("(<div class='wp-pagenavi'.+?/div>)",b,1,re.S)
	href = xsearch("<span class='current'>\d+</span><a href='([^']+?)'",s).replace('#038;','')
	if href:
		next = xsearch('paged=(\d+)',href)
		last = xsearch("<a href='[^']+?(\d+)' class='last'>Cuối »</a>",s)
		
		if not last:
			last = re.findall('>(\d+)</a>',s)
			last = last[-1] if last else ''
		
		title = "Trang kế: %s/%s"%(next, last)
		items.append((namecolor(title,'lime'), fixLink(href), "", query, True))
コード例 #6
0
def pageNext(b, items, query):
	s    = xsearch("(<div class='wp-pagenavi'.+?/div>)",b,1,re.S)
	href = xsearch("<span class='current'>\d+</span><a href='([^']+?)'",s).replace('#038;','')
	if href:
		next = xsearch('paged=(\d+)',href)
		last = xsearch("<a href='[^']+?(\d+)' class='last'>Cuối »</a>",s)
		
		if not last:
			last = re.findall('>(\d+)</a>',s)
			last = last[-1] if last else ''
		
		title = "Trang kế: %s/%s"%(next, last)
		items.append((namecolor(title,'lime'), fixLink(href), "", query, True))
コード例 #7
0
ファイル: thvl.py プロジェクト: vphuc81/MyRepository
def chuongtrinh21h(url):
	b     = xread(url)
	items = []
	for s in re.findall('(<h3>&raquo;.+?"post-info">)',b,re.S):
		title = s2c(xsearch('>([^<]+?)</a>',s))
		href = xsearch('href="([^"]+?)"',s)
		
		if not title or not href:
			continue
		
		img = xsearch('src="([^"].+?)"',s)
		items.append((namecolor(title, c), fixLink(href), img, 'eps', True))
	
	return items
コード例 #8
0
ファイル: thvl.py プロジェクト: vphuc81/MyRepository
def tonghop(url):
	b     = xread(url)
	items = []
	
	for s in re.findall('(<div class="post-content clearfix".+?"content clearfix">)',b,re.S):
		title = '[COLOR cyan]%s[/COLOR]'%xsearch('class="date">([^<].+?)<',s)
		title = title + ' ' + s2c(xsearch('alt="([^"].+?)"',s))
		href = xsearch('href="([^"].+?)"',s)
		img = xsearch('src="([^"].+?)"',s)
		items.append((namecolor(title,c), fixLink(href), img, 'eps', True))
	
	pageNext(b, items, 'tonghop')
		
	return items
コード例 #9
0
def tonghop(url):
	b     = xread(url)
	items = []
	
	for s in re.findall('(<div class="post-content clearfix".+?"content clearfix">)',b,re.S):
		title = '[COLOR cyan]%s[/COLOR]'%xsearch('class="date">([^<].+?)<',s)
		title = title + ' ' + s2c(xsearch('alt="([^"].+?)"',s))
		href = xsearch('href="([^"].+?)"',s)
		img = xsearch('src="([^"].+?)"',s)
		items.append((namecolor(title,c), fixLink(href), img, 'eps', True))
	
	pageNext(b, items, 'tonghop')
		
	return items
コード例 #10
0
def chuongtrinh21h(url):
	b     = xread(url)
	items = []
	for s in re.findall('(<h3>&raquo;.+?"post-info">)',b,re.S):
		title = s2c(xsearch('>([^<]+?)</a>',s))
		href = xsearch('href="([^"]+?)"',s)
		
		if not title or not href:
			continue
		
		img = xsearch('src="([^"].+?)"',s)
		items.append((namecolor(title, c), fixLink(href), img, 'eps', True))
	
	return items
コード例 #11
0
ファイル: thvl.py プロジェクト: vanhung1710/MyRepository
def phim(url):
    b = xread(url)
    b = b[b.find('<div id="main-content">'):]

    s = re.findall('(<div class="video-clip-box".+?/div)', b, re.S)
    items = []
    for s in s:
        title = xsearch('class="date">([^<].+?)<', s)
        if title:
            title = '[COLOR cyan]%s[/COLOR] ' % title
        title = title + s2c(xsearch('alt="([^"].+?)"', s))
        href = xsearch('href="([^"].+?)"', s)
        img = xsearch('src="([^"].+?)"', s)
        items.append((namecolor(title, c), fixLink(href), img, 'eps', True))

    pageNext(b, items, 'phim')

    return items
コード例 #12
0
ファイル: thvl.py プロジェクト: vphuc81/MyRepository
def phim(url):
	b     = xread(url)
	b = b[b.find('<div id="main-content">'):]
	
	s = re.findall('(<div class="video-clip-box".+?/div)',b,re.S)
	items = []
	for s in s:	
		title = xsearch('class="date">([^<].+?)<',s)
		if title:
			title = '[COLOR cyan]%s[/COLOR] '%title
		title = title + s2c(xsearch('alt="([^"].+?)"',s))
		href = xsearch('href="([^"].+?)"',s)
		img = xsearch('src="([^"].+?)"',s)
		items.append((namecolor(title, c), fixLink(href), img, 'eps', True))
	
	pageNext(b, items, 'phim')
	
	return items