'
+ data = httptools.downloadpage(item.url).data
+ matches = re.compile(patron, re.S).findall(data)
+
+ if item.args:
+ s = (int(item.args["season"]))
+ try:
+ matches = [matches[s]]
+ except:
+ matches = [matches[(s - 1)]]
itemlist = []
- # Download pagina
- data = httptools.downloadpage(item.url).data
- data = scrapertools.decodeHtmlentities(data)
- if 'CLICCA QUI PER GUARDARE TUTTI GLI EPISODI' in data:
- item.url = re.sub('\-\d+[^\d]+$', '-links', item.url)
- data = httptools.downloadpage(item.url).data
- data = scrapertools.decodeHtmlentities(data)
- data = scrapertools.find_single_match(data, '
(.*?)
')
+ for season, block in matches:
+ patron = r'
\s+
(.*?)'
+ if item.args:
+ ep = int(item.args["episode"])
+ patron = r'\s+
\s(Episodio ' + str(ep) + r') .*?'
+ episodes = re.compile(patron, re.MULTILINE).findall(block)
+ for scrapedurl, scrapedtitle in episodes:
+ fixedtitle = scrapertools.get_season_and_episode(season + " " + scrapedtitle)
+ eptitle = re.sub(r"Episodio\s+\d+", "", scrapedtitle).strip()
+ itemlist.append(
+ Item(channel=item.channel,
+ action="episodios",
+ contentType=item.contentType,
+ title="[B]" + fixedtitle + " " + eptitle + "[/B]",
+ fulltitle=fixedtitle + " " + eptitle,
+ show=fixedtitle + " " + eptitle,
+ url=scrapedurl,
+ extra=item.extra,
+ ))
- lang_titles = []
- starts = []
- patron = r"Stagione.*?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 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))
+ if not item.args:
+ support.videolibrary(itemlist, item)
return itemlist
def findvideos(item):
- logger.info("kod.italiaserie findvideos")
- itemlist = []
+ support.log()
- # Carica la pagina
- data = item.url
+ itemlist = support.server(item, data=item.url)
+ itemlist = filtertools.get_links(itemlist, item, list_language)
- matches = re.findall(r'', data, re.DOTALL)
-
- data = []
- for url in matches:
- url, c = unshortenit.unshorten(url)
- data.append(url)
-
- itemlist = servertools.find_video_items(data=str(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 findepvideos(item):
- logger.info("kod.italiaserie findepvideos")
-
- itemlist = []
-
- # Carica la pagina
- data = item.url
-
- matches = re.findall(r']*>[^<]+', data, re.DOTALL)
-
- data = []
- for url in matches:
- url, c = unshortenit.unshorten(url)
- data.append(url)
-
- itemlist = servertools.find_video_items(data=str(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
+ autoplay.start(itemlist, item)
return itemlist
diff --git a/plugin.video.alfa/channels/vedohd.py b/plugin.video.alfa/channels/vedohd.py
index 71e3c5ba..4850640c 100644
--- a/plugin.video.alfa/channels/vedohd.py
+++ b/plugin.video.alfa/channels/vedohd.py
@@ -101,12 +101,14 @@ def findvideos(item):
def generos(item):
+ findhost()
patron = '([a-zA-Z]+)'
return support.scrape(item, patron, ['url', 'title'], patron_block='Genere', action='peliculas', url_host=host)
def year(item):
- patron = '([a-zA-Z]+)'
+ findhost()
+ patron = r'(\d+)'
return support.scrape(item, patron, ['url', 'title'], patron_block='Anno', action='peliculas', url_host=host)
diff --git a/plugin.video.alfa/core/scrapertools.py b/plugin.video.alfa/core/scrapertools.py
index 8a45645f..5d0be133 100755
--- a/plugin.video.alfa/core/scrapertools.py
+++ b/plugin.video.alfa/core/scrapertools.py
@@ -367,7 +367,7 @@ def get_season_and_episode(title):
filename = ""
patrons = ["(\d+)\s*[x-]\s*(\d+)", "(\d+)\s*×\s*(\d+)", "(?:s|t)(\d+)e(\d+)",
- "(?:season|temp\w*)\s*(\d+)\s*(?:capitulo|epi|episode\w*)\s*(\d+)"]
+ "(?:season|temp|stagione\w*)\s*(\d+)\s*(?:capitulo|epi|episode|episodio\w*)\s*(\d+)"]
for patron in patrons:
try: