\s*([^<]+)<\/p>'
-## matches = re.compile(patron, re.MULTILINE).findall(data)
-##
-## for url, title, year, thumb, quality in matches:
-## infoLabels = {}
-## infoLabels['year'] = year
-## title = scrapertools.decodeHtmlentities(title)
-## quality = scrapertools.decodeHtmlentities(quality)
-## longtitle = title + support.typo(quality,'_ [] color kod')
-## itemlist.append(
-## Item(channel=item.channel,
-## action=action,
-## contentType=item.contentType,
-## fulltitle=title,
-## show=title,
-## title=longtitle,
-## url=url,
-## thumbnail=thumb,
-## infoLabels=infoLabels,
-## args=item.args))
-##
-## tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
-##
-## return itemlist
-
-
+@support.scrape
def newest(categoria):
- log()
- itemlist = []
- item = Item()
- item.url = host +'/aggiornamenti/'
+ if categoria == 'series':
+ item = Item(url=host + '/aggiornamenti-giornalieri-serie-tv-2')
+ item.contentType = 'tvshow'
+ patronBlock = 'Aggiornamenti Giornalieri Serie TV.*?
(?P.*?)
'
+ patron = '(?P
.*?)\((?P[0-9]{4})-?\)\s*streaming.*?href="(?P[^"]+)'
- matches = support.match(item, patron=r'mediaWrapAlt recomended_videos"[^>]+>\s*\s*
]+>').matches
+ def itemHook(item):
+ item.title = item.contentTitle = item.fulltitle = item.contentSerieName = item.contentTitle = scrapertools.htmlclean(item.title)
+ return item
- for url, title, thumb in matches:
- title = scrapertools.decodeHtmlentities(title).replace("Permalink to ", "").replace("streaming", "")
- title = re.sub(r'\s\(\d+\)','',title)
- itemlist.append(
- Item(channel=item.channel,
- action="findvideos",
- contentType="movie",
- fulltitle=title,
- show=title,
- title=support.typo(title, 'bold'),
- url=url,
- thumbnail=thumb,
- folder=True))
+ return locals()
- tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
- return itemlist
def findvideos(item):
log()
listurl = set()
- # itemlist = []
+ itemlist = []
support.log("ITEMLIST: ", item)
-## if item.args == 'anime':
-## data = item.url
-## else:
-## data = httptools.downloadpage(item.url, headers=headers).data
data = support.match(item.url, headers=headers).data
-
- data = re.sub('\n|\t', ' ', data)
- data = re.sub(r'>\s+<', '> <', data)
- check = support.match(data, patron=r'\s+
\s+(.*?)\s+
\s+').match
+ check = support.match(data, patron=r'(.*?)
').match
if 'sub' in check.lower():
item.contentLanguage = 'Sub-ITA'
support.log("CHECK : ", check)
@@ -248,7 +174,10 @@ def findvideos(item):
item.contentType = 'tvshow'
item.data = data
support.log('select = ### è una anime ###')
- return episodios(item)
+ try:
+ return episodios(item)
+ except:
+ pass
elif 'serie' in check.lower():
item.contentType = 'tvshow'
item.data = data
@@ -267,69 +196,6 @@ def findvideos(item):
if url:
listurl.add(url)
data += '\n'.join(listurl)
- return support.server(item, data)#, headers=headers)
- # return itemlist
-##def findvideos(item):
-## log()
-##
-## # Carica la pagina
-## data = item.url if item.contentType == "episode" else httptools.downloadpage(item.url, headers=headers).data
-##
-## if 'protectlink' in data:
-## urls = scrapertools.find_multiple_matches(data, r'