'
+ next_page = scrapertools.find_single_match(data, patron)
+ if next_page != "":
+ item.url = next_page
+ itemlist = episodios(item, itemlist)
+ else:
+ item.url = item.originalUrl
+ support.videolibrary(itemlist, item, 'bold color kod')
+
+ return itemlist
+
+
+# ================================================================================================================
+
+# ----------------------------------------------------------------------------------------------------------------
+def peliculas_tv(item):
+ log()
+ itemlist = []
+
+ patron = '
\s*
'
+
+ matches, data = support.match(item, patron, headers=headers)
+
+ for scrapedurl, scrapedtitle in matches:
+ if scrapedtitle in ["FACEBOOK", "RAPIDGATOR", "WELCOME!"]:
+ continue
+
+ scrapedthumbnail = ""
+ scrapedplot = ""
+ scrapedtitle = cleantitle(scrapedtitle)
+ infoLabels = {}
+ episode = scrapertools.find_multiple_matches(scrapedtitle, r'((\d*)x(\d*))')
+ if episode: # workaround per quando mettono le serie intere o altra roba, sarebbero da intercettare TODO
+ episode = episode[0]
+ title = scrapedtitle.split(" S0")[0].strip()
+ title = title.split(" S1")[0].strip()
+ title = title.split(" S2")[0].strip()
+
+ infoLabels['season'] = episode[1]
+ infoLabels['episode'] = episode[2].zfill(2)
+
+ itemlist.append(
+ Item(channel=item.channel,
+ action="findvideos",
+ fulltitle=scrapedtitle,
+ show=scrapedtitle,
+ title=title + " - " + episode[0] + " " + support.typo("Sub-ITA", '_ [] color kod'),
+ url=scrapedurl,
+ thumbnail=scrapedthumbnail,
+ contentSerieName=title,
+ contentLanguage='Sub-ITA',
+ plot=scrapedplot,
+ infoLabels=infoLabels,
+ folder=True))
+
+ tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
+
+ # Paginazione
+ patron = r'
\d+\s
\d+'
+ support.nextPage(itemlist, item, data, patron)
+
+ return itemlist
+
+
+# ================================================================================================================
+
+
+# ----------------------------------------------------------------------------------------------------------------
+def newest(categoria):
+ log(categoria)
+ itemlist = []
+ item = Item()
+ item.url = host
+ item.extra = 'serie'
+ try:
+ if categoria == "series":
+ itemlist = peliculas_tv(item)
+
+ except:
+ import sys
+ for line in sys.exc_info():
+ logger.error("{0}".format(line))
+ return []
+
+ return itemlist
+
+
+# ================================================================================================================
+
+# ----------------------------------------------------------------------------------------------------------------
+def search(item, texto):
+ log(texto)
+ itemlist = []
+
+ patron = '
([^<]+)'
+ matches = support.match(item, patron, headers=headers)[0]
+
+ for i, (scrapedurl, scrapedtitle) in enumerate(matches):
+ if texto.upper() in scrapedtitle.upper():
+ scrapedthumbnail = ""
+ scrapedplot = ""
+ title = cleantitle(scrapedtitle)
+ itemlist.append(
+ Item(channel=item.channel,
+ extra=item.extra,
+ action="episodios",
+ title=title,
+ url=scrapedurl,
+ thumbnail=scrapedthumbnail,
+ fulltitle=title,
+ show=title,
+ plot=scrapedplot,
+ contentType='episode',
+ originalUrl=scrapedurl,
+ folder=True))
+ tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
+
+ return itemlist
+
+
+# ================================================================================================================
+
+# ----------------------------------------------------------------------------------------------------------------
+
+
+def list_az(item):
+ log()
+ itemlist = []
+
+ alphabet = dict()
+ patron = '([^<]+)'
+ matches = support.match(item, patron, headers=headers)[0]
+
+ for i, (scrapedurl, scrapedtitle) in enumerate(matches):
+ letter = scrapedtitle[0].upper()
+ if letter not in alphabet:
+ alphabet[letter] = []
+ alphabet[letter].append(scrapedurl + '||' + scrapedtitle)
+
+ for letter in sorted(alphabet):
+ itemlist.append(
+ Item(channel=item.channel,
+ action="lista_serie",
+ url='\n\n'.join(alphabet[letter]),
+ title=letter,
+ fulltitle=letter))
+
+ return itemlist
+
+# ================================================================================================================
+