Fix Animeworld

This commit is contained in:
Alhaziel
2019-06-17 19:53:40 +02:00
parent a0d0c9e855
commit 2e09c985fc

View File

@@ -245,7 +245,8 @@ def video(item):
fulltitle=title,
show=title,
thumbnail=scrapedthumb,
context = autoplay.context))
context = autoplay.context,
number= '1'))
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
autorenumber.renumber(itemlist)
@@ -258,8 +259,7 @@ def video(item):
def episodios(item):
log()
itemlist = []
patron_block = r'<div class="widget servers".*?>(.*?)<div id="download"'
patron_block = r'server active(.*?)server hidden '
patron = r'<li><a [^=]+="[^"]+"[^=]+="[^"]+"[^=]+="[^"]+"[^=]+="[^"]+"[^=]+="[^"]+" href="([^"]+)"[^>]+>([^<]+)<'
matches = support.match(item, patron, patron_block)[0]
@@ -275,7 +275,8 @@ def episodios(item):
show=scrapedtitle,
plot=item.plot,
fanart=item.thumbnail,
thumbnail=item.thumbnail))
thumbnail=item.thumbnail,
number=scrapedtitle))
autorenumber.renumber(itemlist, item,'bold')
support.videolibrary(itemlist, item)
@@ -285,31 +286,31 @@ def episodios(item):
def findvideos(item):
log()
itemlist = []
matches, data = support.match(item, r'class="tab.*?data-name="([0-9]+)">([^<]+)</span', headers=headers)
videoData = ''
for serverid, servername in matches:
block = scrapertoolsV2.find_multiple_matches(data,'data-id="'+serverid+'">(.*?)<div class="server')
id = scrapertoolsV2.find_single_match(str(block),r'<a data-id="([^"]+)" data-base="'+item.fulltitle+'"')
dataJson = httptools.downloadpage('%s/ajax/episode/info?id=%s&server=%s&ts=%s' % (host, id, serverid, int(time.time())), headers=[['x-requested-with', 'XMLHttpRequest']]).data
json = jsontools.load(dataJson)
log('JSON= ',json)
log('ITEM= ',item)
id = scrapertoolsV2.find_single_match(str(block),r'<a data-id="([^"]+)" data-base="'+item.number+'"')
if id:
dataJson = httptools.downloadpage('%s/ajax/episode/info?id=%s&server=%s&ts=%s' % (host, id, serverid, int(time.time())), headers=[['x-requested-with', 'XMLHttpRequest']]).data
json = jsontools.load(dataJson)
videoData +='\n'+json['grabber']
videoData +='\n'+json['grabber']
if serverid == '28':
itemlist.append(
Item(
channel=item.channel,
action="play",
title='diretto',
quality='',
url=json['grabber'],
server='directo',
show=item.show,
contentType=item.contentType,
folder=False))
if serverid == '28':
itemlist.append(
Item(
channel=item.channel,
action="play",
title='diretto',
quality='',
url=json['grabber'],
server='directo',
show=item.show,
contentType=item.contentType,
folder=False))
return support.server(item, videoData, itemlist)