([^<]+)')
- title = title.replace("Streaming", "")
- title = scrapertools.decodeHtmlentities(title).strip()
- url = scrapertools.find_single_match(match, '') #
- for url in urls: # Fix
- page = httptools.downloadpage(url, headers=headers).data #
- data += '\n' + scrapertools.find_single_match(page,'') #
-
-
- for videoitem in servertools.find_video_items(data=data):
- videoitem.title = item.title + videoitem.title
- videoitem.fulltitle = item.fulltitle
- videoitem.thumbnail = item.thumbnail
- videoitem.show = item.show
- videoitem.plot = item.plot
- videoitem.channel = item.channel
- videoitem.contentType = item.contentType
- itemlist.append(videoitem)
-
- return itemlist
-
-
-def peliculas_tv(item):
- logger.info("[italiafilm.py] peliculas")
- itemlist = []
-
- data = httptools.downloadpage(item.url, headers=headers).data
- patron = ''
- matches = re.compile(patron, re.DOTALL).findall(data)
-
- for match in matches:
- title = scrapertools.find_single_match(match, '([^<]+)')
- title = title.replace("Streaming", "")
- title = scrapertools.decodeHtmlentities(title).strip()
- show_title = re.sub('\(.*?\)', '', title.replace('Serie TV', ''))
- url = scrapertools.find_single_match(match, ' 0:
- scrapedtitle = re.sub(r'<[^>]*>', '', data[:end]).strip()
- else:
- scrapedtitle = ''
- if scrapedtitle == '':
- patron = '([^<]+)'
- scrapedtitle = scrapertools.find_single_match(data, patron).strip()
- title = scrapertools.find_single_match(scrapedtitle, '\d+[^\d]+\d+')
- if title == '':
- title = scrapedtitle
- if title != '':
- title = re.sub(r"(\d+)[^\d]+(\d+)", r"\1x\2", title)
- title += " (" + lang_title + ")"
- itemlist.append(
- Item(channel=item.channel,
- action="findvideos",
- contentType="episode",
- title=title,
- url=data,
- thumbnail=item.thumbnail,
- extra=item.extra,
- fulltitle=title + ' - ' + item.show,
- show=item.show))
-
- logger.info("[italiafilm.py] episodios")
-
- itemlist = []
-
- # Carica la pagina
- data = httptools.downloadpage(item.url, headers=headers).data.replace('
','\n') # fix
-
- start = data.find('id="pd_rating_holder')
- end = data.find('id="linkcorrotto-show"', start)
-
- data = data[start:end]
-
- lang_titles = []
- starts = []
- patron = r"STAGION[I|E](.*?ITA)?"
- matches = re.compile(patron, re.IGNORECASE).finditer(data)
- for match in matches:
- season_title = match.group()
- # if season_title != '':
- lang_titles.append('SUB ITA' if 'SUB' in season_title.upper() else 'ITA')
- starts.append(match.end())
-
- i = 1
- len_lang_titles = len(lang_titles)
-
- while i <= len_lang_titles:
- inizio = starts[i - 1]
- fine = starts[i] if i < len_lang_titles else -1
-
- html = data[inizio:fine]
- lang_title = lang_titles[i - 1]
-
- load_episodios(html, item, itemlist, lang_title)
-
- i += 1
-
- if len(itemlist) == 0:
- load_episodios(data, item, itemlist, 'ITA')
-
- if config.get_videolibrary_support() and len(itemlist) != 0:
- itemlist.append(
- Item(channel=item.channel,
- title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
- url=item.url,
- action="add_serie_to_library",
- extra="episodios",
- show=item.show))
-
- return itemlist
-
-
-def findvideos(item):
- logger.info("kod.italiafilm findvideos")
-
- if item.contentType == "movie":
- return findvid(item)
-
- # Carica la pagina
- data = item.url
-
- urls = scrapertools.find_multiple_matches(data, '') #
- for url in urls: # Fix
- page = httptools.downloadpage(url, headers=headers).data #
- data += '\n' + scrapertools.find_single_match(page,'') #
-
- itemlist = servertools.find_video_items(data=data)
-
- for videoitem in itemlist:
- videoitem.title = item.title + videoitem.title
- videoitem.fulltitle = item.fulltitle
- videoitem.thumbnail = item.thumbnail
- videoitem.show = item.show
- videoitem.plot = item.plot
- videoitem.channel = item.channel
- videoitem.contentType = item.contentType
-
- return itemlist
-
-
-def findvideos_single_ep(item):
- logger.info("[italiafilm.py] findvideos_single_ep")
-
- data = httptools.downloadpage(item.url).data
-
- data = scrapertools.find_single_match(data, item.extra)
-
- itemlist = servertools.find_video_items(data=data)
-
- for videoitem in itemlist:
- server = re.sub(r'[-\[\]\s]+', '', videoitem.title)
- videoitem.title = "".join(["[[COLOR orange]%s[/COLOR]] " % server.capitalize(), item.title])
- videoitem.fulltitle = item.fulltitle
- videoitem.show = item.show
- videoitem.thumbnail = item.thumbnail
- videoitem.channel = item.channel
-
- return itemlist
([^<]+)')
- title = title.replace("Streaming", "")
- title = scrapertools.decodeHtmlentities(title).strip()
- show_title = re.sub('\(.*?\)', '', title.replace('Serie TV', ''))
- url = scrapertools.find_single_match(match, ' 0:
- scrapedtitle = re.sub(r'<[^>]*>', '', data[:end]).strip()
- else:
- scrapedtitle = ''
- if scrapedtitle == '':
- patron = '([^<]+)'
- scrapedtitle = scrapertools.find_single_match(data, patron).strip()
- title = scrapertools.find_single_match(scrapedtitle, '\d+[^\d]+\d+')
- if title == '':
- title = scrapedtitle
- if title != '':
- title = re.sub(r"(\d+)[^\d]+(\d+)", r"\1x\2", title)
- title += " (" + lang_title + ")"
- itemlist.append(
- Item(channel=item.channel,
- action="findvideos",
- contentType="episode",
- title=title,
- url=data,
- thumbnail=item.thumbnail,
- extra=item.extra,
- fulltitle=title + ' - ' + item.show,
- show=item.show))
-
- logger.info("[italiafilm.py] episodios")
-
- itemlist = []
-
- # Carica la pagina
- data = httptools.downloadpage(item.url, headers=headers).data.replace('
','\n') # fix
-
- start = data.find('id="pd_rating_holder')
- end = data.find('id="linkcorrotto-show"', start)
-
- data = data[start:end]
-
- lang_titles = []
- starts = []
- patron = r"STAGION[I|E](.*?ITA)?"
- matches = re.compile(patron, re.IGNORECASE).finditer(data)
- for match in matches:
- season_title = match.group()
- # if season_title != '':
- lang_titles.append('SUB ITA' if 'SUB' in season_title.upper() else 'ITA')
- starts.append(match.end())
-
- i = 1
- len_lang_titles = len(lang_titles)
-
- while i <= len_lang_titles:
- inizio = starts[i - 1]
- fine = starts[i] if i < len_lang_titles else -1
-
- html = data[inizio:fine]
- lang_title = lang_titles[i - 1]
-
- load_episodios(html, item, itemlist, lang_title)
-
- i += 1
-
- if len(itemlist) == 0:
- load_episodios(data, item, itemlist, 'ITA')
-
- if config.get_videolibrary_support() and len(itemlist) != 0:
- itemlist.append(
- Item(channel=item.channel,
- title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
- url=item.url,
- action="add_serie_to_library",
- extra="episodios",
- show=item.show))
-
- return itemlist
-
-
-def findvideos(item):
- logger.info("kod.italiafilm findvideos")
-
- if item.contentType == "movie":
- return findvid(item)
-
- # Carica la pagina
- data = item.url
-
- urls = scrapertools.find_multiple_matches(data, '') #
- for url in urls: # Fix
- page = httptools.downloadpage(url, headers=headers).data #
- data += '\n' + scrapertools.find_single_match(page,'') #
-
- itemlist = servertools.find_video_items(data=data)
-
- for videoitem in itemlist:
- videoitem.title = item.title + videoitem.title
- videoitem.fulltitle = item.fulltitle
- videoitem.thumbnail = item.thumbnail
- videoitem.show = item.show
- videoitem.plot = item.plot
- videoitem.channel = item.channel
- videoitem.contentType = item.contentType
-
- return itemlist
-
-
-def findvideos_single_ep(item):
- logger.info("[italiafilm.py] findvideos_single_ep")
-
- data = httptools.downloadpage(item.url).data
-
- data = scrapertools.find_single_match(data, item.extra)
-
- itemlist = servertools.find_video_items(data=data)
-
- for videoitem in itemlist:
- server = re.sub(r'[-\[\]\s]+', '', videoitem.title)
- videoitem.title = "".join(["[[COLOR orange]%s[/COLOR]] " % server.capitalize(), item.title])
- videoitem.fulltitle = item.fulltitle
- videoitem.show = item.show
- videoitem.thumbnail = item.thumbnail
- videoitem.channel = item.channel
-
- return itemlist
','\n') # fix - - start = data.find('id="pd_rating_holder') - end = data.find('id="linkcorrotto-show"', start) - - data = data[start:end] - - lang_titles = [] - starts = [] - patron = r"STAGION[I|E](.*?ITA)?" - matches = re.compile(patron, re.IGNORECASE).finditer(data) - for match in matches: - season_title = match.group() - # if season_title != '': - lang_titles.append('SUB ITA' if 'SUB' in season_title.upper() else 'ITA') - starts.append(match.end()) - - i = 1 - len_lang_titles = len(lang_titles) - - while i <= len_lang_titles: - inizio = starts[i - 1] - fine = starts[i] if i < len_lang_titles else -1 - - html = data[inizio:fine] - lang_title = lang_titles[i - 1] - - load_episodios(html, item, itemlist, lang_title) - - i += 1 - - if len(itemlist) == 0: - load_episodios(data, item, itemlist, 'ITA') - - if config.get_videolibrary_support() and len(itemlist) != 0: - itemlist.append( - Item(channel=item.channel, - title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161), - url=item.url, - action="add_serie_to_library", - extra="episodios", - show=item.show)) - - return itemlist - - -def findvideos(item): - logger.info("kod.italiafilm findvideos") - - if item.contentType == "movie": - return findvid(item) - - # Carica la pagina - data = item.url - - urls = scrapertools.find_multiple_matches(data, '