Fix Cinemalibero (Wrestling)
This commit is contained in:
+18
-22
@@ -97,6 +97,7 @@ def peliculas(item):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
data = item.data
|
data = item.data
|
||||||
|
# support.dbg()
|
||||||
# debugBlock = True
|
# debugBlock = True
|
||||||
if item.args == 'anime':
|
if item.args == 'anime':
|
||||||
logger.debug("Anime :", item)
|
logger.debug("Anime :", item)
|
||||||
@@ -104,6 +105,13 @@ def episodios(item):
|
|||||||
patron = r'<a target=(?P<url>[^>]+>(?P<title>Episodio\s(?P<episode>\d+))(?::)?(?:(?P<title2>[^<]+))?.*?(?:<br|</p))'
|
patron = r'<a target=(?P<url>[^>]+>(?P<title>Episodio\s(?P<episode>\d+))(?::)?(?:(?P<title2>[^<]+))?.*?(?:<br|</p))'
|
||||||
patronBlock = r'(?:Stagione (?P<season>\d+))?(?:</span><br />|</span></p>|strong></p>)(?P<block>.*?)(?:<div style="margin-left|<span class="txt_dow">)'
|
patronBlock = r'(?:Stagione (?P<season>\d+))?(?:</span><br />|</span></p>|strong></p>)(?P<block>.*?)(?:<div style="margin-left|<span class="txt_dow">)'
|
||||||
item.contentType = 'tvshow'
|
item.contentType = 'tvshow'
|
||||||
|
elif item.args == 'wrestling':
|
||||||
|
|
||||||
|
logger.debug("Wrestling :", item)
|
||||||
|
# debugBlock = True
|
||||||
|
patron = r'(?:/>|<p>)\s*(?P<title>[^-]+)-(?P<data>.+?)(?:<br|</p)'
|
||||||
|
patronBlock = r'</strong>\s*</p>(?P<block>.*?</p>)'
|
||||||
|
item.contentType = 'tvshow'
|
||||||
elif item.args == 'serie' or item.contentType == 'tvshow':
|
elif item.args == 'serie' or item.contentType == 'tvshow':
|
||||||
logger.debug("Serie :", item)
|
logger.debug("Serie :", item)
|
||||||
# debugBlock = True
|
# debugBlock = True
|
||||||
@@ -120,6 +128,8 @@ def episodios(item):
|
|||||||
|
|
||||||
def itemlistHook(itl):
|
def itemlistHook(itl):
|
||||||
ret = []
|
ret = []
|
||||||
|
if item.args == 'wrestling':
|
||||||
|
return itl
|
||||||
for it in itl:
|
for it in itl:
|
||||||
ep = scrapertools.find_single_match(it.title, r'(\d+x\d+)')
|
ep = scrapertools.find_single_match(it.title, r'(\d+x\d+)')
|
||||||
if not ep and 'http' in it.data: # stagione intera
|
if not ep and 'http' in it.data: # stagione intera
|
||||||
@@ -203,39 +213,22 @@ def check(item):
|
|||||||
data = support.match(item.url, headers=headers).data
|
data = support.match(item.url, headers=headers).data
|
||||||
if data:
|
if data:
|
||||||
ck = support.match(data, patron=r'Supportaci condividendo quest[oa] ([^:]+)').match.lower()
|
ck = support.match(data, patron=r'Supportaci condividendo quest[oa] ([^:]+)').match.lower()
|
||||||
|
if ck == 'film':
|
||||||
if ck == 'serie tv':
|
|
||||||
item.contentType = 'tvshow'
|
|
||||||
item.args = 'serie'
|
|
||||||
item.data = data
|
|
||||||
return episodios(item)
|
|
||||||
|
|
||||||
elif ck == 'anime':
|
|
||||||
item.contentType = 'tvshow'
|
|
||||||
item.args = 'anime'
|
|
||||||
item.data = data
|
|
||||||
itemlist = episodios(item)
|
|
||||||
if not itemlist:
|
|
||||||
item.data = data
|
|
||||||
# item.action = 'findvideos'
|
|
||||||
return findvideos(item)
|
|
||||||
|
|
||||||
elif ck == 'film':
|
|
||||||
item.contentType = 'movie'
|
item.contentType = 'movie'
|
||||||
item.data = data
|
item.data = data
|
||||||
# item.action = 'findvideos'
|
# item.action = 'findvideos'
|
||||||
return findvideos(item)
|
return findvideos(item)
|
||||||
|
|
||||||
else:
|
elif ck in ['serie tv', 'wrestling wwe', 'anime']:
|
||||||
item.contentType = 'tvshow'
|
item.contentType = 'tvshow'
|
||||||
|
item.args = ck.split()[0]
|
||||||
item.data = data
|
item.data = data
|
||||||
itemlist = episodios(item)
|
itemlist = episodios(item)
|
||||||
if not itemlist:
|
if not itemlist:
|
||||||
item.contentType = 'movie'
|
|
||||||
item.data = data
|
item.data = data
|
||||||
# item.action = 'findvideos'
|
|
||||||
return findvideos(item)
|
return findvideos(item)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
@@ -248,11 +241,14 @@ def findvideos(item):
|
|||||||
item.contentEpisodeNumber).zfill(2):
|
item.contentEpisodeNumber).zfill(2):
|
||||||
servers.append(s)
|
servers.append(s)
|
||||||
logger.debug()
|
logger.debug()
|
||||||
|
# support.dbg()
|
||||||
if item.servers:
|
if item.servers:
|
||||||
return support.server(item, itemlist=[Item().fromurl(s) for s in item.servers])
|
return support.server(item, itemlist=[Item().fromurl(s) for s in item.servers])
|
||||||
if not item.data:
|
if not item.data:
|
||||||
item.data = httptools.downloadpage(item.url)
|
item.data = httptools.downloadpage(item.url)
|
||||||
item.data = scrapertools.find_single_match(item.data, '<div class="at-above-post addthis_tool"(.*?)<div class="at-below-post')
|
data = scrapertools.find_single_match(item.data, '<div class="at-above-post addthis_tool"(.*?)<div class="at-below-post')
|
||||||
|
if data:
|
||||||
|
item.data = data
|
||||||
|
|
||||||
servers = []
|
servers = []
|
||||||
if item.args == 'anime':
|
if item.args == 'anime':
|
||||||
|
|||||||
Reference in New Issue
Block a user