[^\"]+)\" >\s*(?P[^<]+?)\s*(\((?PSub-[a-zA-Z]+)*\))?\s*(\[(?P[A-Z]*)\])?\s*(\((?P[0-9]{4})\))?\s+<']).matches:
+ infoLabels = dict()
+ infoLabels['fanart'] = it[0]
+ infoLabels['title'] = support.cleantitle(it[2])
+ infoLabels['mediatype'] = 'undefined'
+ infoLabels['year'] = it[8]
+ itemlist.append(item.clone(contentType = 'undefined',
+ action='check',
+ thumbnail = item.thumbnail,
+ fulltitle = support.cleantitle(it[2]),
+ title = support.format_longtitle(support.cleantitle(it[2]), quality = it[6], lang = it[4]),
+ url = it[1],
+ infoLabels = infoLabels)
+ )
+
+ tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
+
+ if not item.args == 'search' and not len(itemlist) < 10: # pagination not works
+ if not item.parent_url:
+ item.parent_url = item.url
+
+ item.nextpage = item.page + 1
+ item.url = "{}/page/{}".format(item.parent_url, item.nextpage)
+
+ resp = httptools.downloadpage(item.url, only_headers = True)
+ if (resp.code < 399): # no more elements
+ support.nextPage(itemlist = itemlist, item = item, next_page=item.url)
+
+ return itemlist
-@support.scrape
def episodios(item):
item.quality = ''
data = item.data
- action='findvideos'
- patron = r').*?(?=>)>(?P[^<]+).*?(?=)>(?P[^<[(]+)'
- return locals()
+ itemlist = []
+
+ for it in support.match(data, patron=[r'div class=\"single-season.*?(?Pseason_[0-9]+).*?>Stagione:\s(?P[0-9]+).*? [^\"]+).*?img\" src=\"(?P[^\"]+).*?title\">(?P[0-9]+)\.\s+(?P.*?)']).matches:
+ logger.debug(ep)
+ infoLabels = dict()
+ infoLabels['tvshowtitle'] = support.cleantitle(item.fulltitle)
+ infoLabels['season'] = int(it[1])
+ infoLabels['episode'] = int(ep[2])
+ infoLabels['episodeName'] = support.cleantitle(ep[3])
+ itemlist.append(item.clone(contentType = 'tvshow',
+ action='findvideos',
+ thumb = ep[1],
+ title = support.format_longtitle(support.cleantitle(ep[3]), season = it[1], episode = ep[2]),
+ url = ep[0],
+ infoLabels = infoLabels)
+ )
+
+ tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
+
+ return itemlist
def check(item):
item.data = httptools.downloadpage(item.url).data
- if 'stagione' in item.data.lower():
+ if 'season-details' in item.data.lower():
item.contentType = 'tvshow'
return episodios(item)
else:
@@ -112,7 +148,8 @@ def findvideos(item):
video_url = item.url
if item.contentType == 'movie':
- video_url = support.match(item, patron=r'
).*?(?=>)>(?P[^<]+).*?(?=)>(?P[^<[(]+)'
- return locals()
+ itemlist = []
+
+ for it in support.match(data, patron=[r'div class=\"single-season.*?(?Pseason_[0-9]+).*?>Stagione:\s(?P[0-9]+).*?
[^\"]+).*?img\" src=\"(?P