]+>([^<]+)<[^>]+>[^>]+>[^>]+>'
+ patron += r'[^<]+[^"]+".*?serie="([^"]+)".*?stag="([0-9]*)".*?ep="([0-9]*)"\s*'
+ patron += r'.*?embed="([^"]+)"\s*.*?embed2="([^"]+)?"\s*.*?embed3="([^"]+)?"?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*'
+ patron += r'(?:]+>|
]+>)?'
+ # matches = re.compile(patron, re.DOTALL).findall(data)
- if config.get_videolibrary_support() and len(itemlist) != 0:
+ # logger.debug(matches)
+
+ matches = support.match(item, patron, headers=headers)[0]
+
+
+ for scrapedtitle, scrapedepisodetitle, scrapedplot, scrapedserie, scrapedseason, scrapedepisode, scrapedurl, scrapedurl2,scrapedurl3,scrapedthumbnail,scrapedthumbnail2 in matches:
+ scrapedtitle = cleantitle(scrapedtitle)
+ scrapedepisode = scrapedepisode.zfill(2)
+ scrapedepisodetitle = cleantitle(scrapedepisodetitle)
+ title = str("%sx%s %s" % (scrapedseason, scrapedepisode, scrapedepisodetitle)).strip()
+ if 'SUB-ITA' in scrapedtitle:
+ title +=" Sub-ITA"
+
+ infoLabels = {}
+ infoLabels['season'] = scrapedseason
+ infoLabels['episode'] = scrapedepisode
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="episodi",
- show=item.show))
+ Item(channel=item.channel,
+ action="findvideos",
+ title=title,
+ fulltitle=scrapedtitle,
+ url=scrapedurl+"\r\n"+scrapedurl2+"\r\n"+scrapedurl3,
+ contentType="episode",
+ plot=scrapedplot,
+ contentSerieName=scrapedserie,
+ contentLanguage='Sub-ITA' if 'Sub-ITA' in title else '',
+ infoLabels=infoLabels,
+ thumbnail=scrapedthumbnail2 if scrapedthumbnail2 != '' else scrapedthumbnail,
+ folder=True))
+
+ tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
+
+ support.videolibrary(itemlist, item)
return itemlist
@@ -256,20 +315,12 @@ def episodi(item):
# ----------------------------------------------------------------------------------------------------------------
def findepvideos(item):
- logger.info("[GuardaSerieClick.py]==> findepvideos")
-
+ support.log(item.channel+" findepvideos")
data = httptools.downloadpage(item.url, headers=headers).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).capitalize()
- videoitem.title = "".join(["[%s] " % support.color(server.capitalize(), 'orange'), item.title])
- videoitem.fulltitle = item.fulltitle
- videoitem.thumbnail = item.thumbnail
- videoitem.show = item.show
- videoitem.plot = item.plot
- videoitem.channel = item.channel
+ matches = scrapertools.find_multiple_matches(data, item.extra)
+ data = "\r\n".join(matches[0])
+ item.contentType = 'movie'
+ itemlist = support.server(item, data=data)
return itemlist
@@ -278,17 +329,8 @@ def findepvideos(item):
# ----------------------------------------------------------------------------------------------------------------
def findvideos(item):
- logger.info("[GuardaSerieClick.py]==> findvideos")
-
- itemlist = servertools.find_video_items(data=item.url)
-
- for videoitem in itemlist:
- server = re.sub(r'[-\[\]\s]+', '', videoitem.title).capitalize()
- videoitem.title = "".join(["[%s] " % support.color(server.capitalize(), 'orange'), item.title])
- videoitem.fulltitle = item.fulltitle
- videoitem.thumbnail = item.thumbnail
- videoitem.show = item.show
- videoitem.plot = item.plot
- videoitem.channel = item.channel
+ support.log(item.channel+" findvideos")
+ logger.debug(item.url)
+ itemlist = support.server(item, data=item.url)
return itemlist
diff --git a/channelselector.py b/channelselector.py
index 66c09c56..7c0c7e44 100644
--- a/channelselector.py
+++ b/channelselector.py
@@ -383,7 +383,11 @@ def thumb(itemlist=[]):
item.thumbnail = get_thumb(thumb + '.png')
else:
thumb = item.thumbnails
- # REmove args from title
+
+ if item.thumbnail != '':
+ break
+
+ # Remove args from title
if item.args: item.title = item.title.replace(' || ' + str(item.args), '')
return itemlist
else:
diff --git a/core/support.py b/core/support.py
index cfa6f33a..b74f1198 100644
--- a/core/support.py
+++ b/core/support.py
@@ -95,7 +95,7 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
patronNext="", action="findvideos", addVideolibrary = True, type_content_dict={}, type_action_dict={}):
# patron: the patron to use for scraping page, all capturing group must match with listGroups
# listGroups: a list containing the scraping info obtained by your patron, in order
- # accepted values are: url, title, thumb, quality, year, plot, duration, genre, rating
+ # accepted values are: url, title, thumb, quality, year, plot, duration, genre, rating, episode, lang
# header: values to pass to request header
# blacklist: titles that you want to exclude(service articles for example)
@@ -112,7 +112,7 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
# patron = 'blablabla'
# headers = [['Referer', host]]
# blacklist = 'Request a TV serie!'
- # return support.scrape(item, itemlist, patron, ['thumb', 'quality', 'url', 'title', 'year', 'plot'],
+ # return support.scrape(item, itemlist, patron, ['thumb', 'quality', 'url', 'title', 'year', 'plot', 'episode', 'lang'],
# headers=headers, blacklist=blacklist)
# 'type' is a check for typologies of content e.g. Film or TV Series
# 'episode' is a key to grab episode numbers if it is separated from the title
@@ -136,7 +136,7 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
blocks = scrapertoolsV2.find_multiple_matches(block, regex)
block = ""
for b in blocks:
- block += "\n" + b
+ block += "\n" + str(b)
log('BLOCK ', n, '=', block)
else:
block = data
@@ -144,7 +144,8 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
matches = scrapertoolsV2.find_multiple_matches(block, patron)
log('MATCHES =', matches)
- known_keys = ['url', 'title', 'title2', 'episode', 'thumb', 'quality', 'year', 'plot', 'duration', 'genere', 'rating', 'type'] #by greko aggiunto episode
+ known_keys = ['url', 'title', 'title2', 'episode', 'thumb', 'quality', 'year', 'plot', 'duration', 'genere', 'rating', 'type', 'lang'] #by greko aggiunto episode
+
for match in matches:
if len(listGroups) > len(match): # to fix a bug
match = list(match)
@@ -157,7 +158,7 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
val = scrapertoolsV2.find_single_match(item.url, 'https?://[a-z0-9.-]+') + val
scraped[kk] = val
- title = scrapertoolsV2.decodeHtmlentities(scraped["title"]).strip()
+ title = scrapertoolsV2.decodeHtmlentities(scraped["title"]).replace('"', "'").strip() # fix by greko da " a '
plot = scrapertoolsV2.htmlclean(scrapertoolsV2.decodeHtmlentities(scraped["plot"]))
longtitle = typo(title, 'bold')
@@ -168,6 +169,12 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
if scraped['title2']:
title2 = scrapertoolsV2.decodeHtmlentities(scraped["title2"]).strip()
longtitle = longtitle + typo(title2, 'bold _ -- _')
+ if scraped["lang"]:
+ if 'sub' in scraped["lang"].lower():
+ lang = 'Sub-ITA'
+ else:
+ lang = 'ITA'
+ longtitle += typo(lang, '_ [] color kod')
if item.infoLabels["title"] or item.fulltitle: # if title is set, probably this is a list of episodes or video sources
infolabels = item.infoLabels
diff --git a/resources/media/channels/banner/animeworld.png b/resources/media/channels/banner/animeworld.png
new file mode 100644
index 00000000..7f727b4f
Binary files /dev/null and b/resources/media/channels/banner/animeworld.png differ
diff --git a/resources/media/channels/banner/guardaserieclick.png b/resources/media/channels/banner/guardaserieclick.png
new file mode 100644
index 00000000..027c3c32
Binary files /dev/null and b/resources/media/channels/banner/guardaserieclick.png differ
diff --git a/resources/media/channels/thumb/animeworld.png b/resources/media/channels/thumb/animeworld.png
new file mode 100644
index 00000000..d0b57098
Binary files /dev/null and b/resources/media/channels/thumb/animeworld.png differ
diff --git a/resources/media/channels/thumb/guardaserieclick.png b/resources/media/channels/thumb/guardaserieclick.png
new file mode 100644
index 00000000..58ae6dca
Binary files /dev/null and b/resources/media/channels/thumb/guardaserieclick.png differ