Beispiel #1
0
def list_top(page):
	data = util.substr(page,'<div class=\"postContent','</ul>')
	pattern = '<li>[^<]*<a href="(?P<url>[^\"]+)[^>]*>(?P<name>[^<]+)'
	for m in re.finditer(pattern, data, re.IGNORECASE | re.DOTALL ):
		util.add_video(
			m.group('name'),
			{'play':furl(m.group('url'))},
			menuItems={xbmc.getLocalizedString(33003):{'name':m.group('name'),'download':m.group('url')}}
		)
Beispiel #2
0
def parse_page(page,url):
	data = util.substr(page,'<div class=\"vypis','<div class=\"right')
	pattern = '<div class=\"tale_char_div\"(.+?)<img(.+?)src=\"(?P<img>[^\"]+)(.+?)<a(.+?)href=\"(?P<url>[^\"]+)[^>]+>(?P<name>[^<]+)<(.+?)<p[^>]*>(?P<plot>[^<]+)'
	for m in re.finditer(pattern, data, re.IGNORECASE | re.DOTALL):
		util.add_video(
			m.group('name'),
			{'play':furl(m.group('url'))},
			m.group('img'),
			infoLabels={'Plot':m.group('plot')},
			menuItems={xbmc.getLocalizedString(33003):{'name':m.group('name'),'download':furl(m.group('url'))}}
		)
	data = util.substr(page,'<p class=\"p_wrapper','</p>')
	index =  url.find('?')
	if index > 0:
		url = url[:index]
	n = re.search('<a(.+?)href=\"(?P<url>[^\"]+)\"[^>]*>&gt;<',data)
	if n:
		util.add_dir(__language__(30012),{'tale':furl(url+n.group('url'))},util.icon('next.png'))
	xbmcplugin.endOfDirectory(int(sys.argv[1]))
Beispiel #3
0
def list_content(page,url=BASE_URL):
	data = util.substr(page,'<div class=\"contentArea','<div class=\"pagination\">')
	pattern = '<h\d class=\"postTitle\"><a href=\"(?P<url>[^\"]+)(.+?)<span>(?P<name>[^<]+)</span></a>(.+?)<div class=\"postContent\">[^<]+<a[^>]+[^<]+<img src=\"(?P<img>[^\"]+)[^<]+</a>[^<]*<div class=\"obs\">[^>]+>(?P<plot>(.+?))</p>'
	for m in re.finditer(pattern, data, re.IGNORECASE | re.DOTALL ):
		plot = re.sub('<br[^>]*>','',m.group('plot'))
		util.add_video(
			m.group('name'),
			{'play':furl(m.group('url'))},
			m.group('img'),
			infoLabels={'plot':plot},
			menuItems={xbmc.getLocalizedString(33003):{'name':m.group('name'),'download':furl(m.group('url'))}}
		)
	data = util.substr(page,'<div class=\"pagination\">','</div>')
	m = re.search('<li class=\"info\"><span>([^<]+)',data)
	n = re.search('<li class=\"prev\"[^<]+<a href=\"(?P<url>[^\"]+)[^<]+<span>(?P<name>[^<]+)',data)
	k = re.search('<li class=\"next\"[^<]+<a href=\"(?P<url>[^\"]+)[^<]+<span>(?P<name>[^<]+)',data)
	# replace last / + everyting till the end
	myurl = re.sub('\/[\w\-]+$','/',url)
	if not m == None:
		if not n == None:
			util.add_dir('%s - %s' % (m.group(1),n.group('name')),{'cat':myurl+n.group('url')})
		if not k == None:
			util.add_dir('%s - %s' % (m.group(1),k.group('name')),{'cat':myurl+k.group('url')})