working on filmontv
This commit is contained in:
@@ -22,39 +22,92 @@ def mainlist(item):
|
||||
# thumbnail=get_thumb("now_playing.png")),
|
||||
#Item(channel="search", action='discover_list', title=config.get_localized_string(70312),
|
||||
# search_type='list', list_type='tv/on_the_air', thumbnail=get_thumb("on_the_air.png")),
|
||||
Item(channel=item.channel,
|
||||
title="DT",
|
||||
Item(channel=item.channel,
|
||||
title="DT Film",
|
||||
action="now_on_tv",
|
||||
url="%s/film-in-tv/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="P",
|
||||
Item(channel=item.channel,
|
||||
title="P Film",
|
||||
action="now_on_tv",
|
||||
url="%s/film-in-tv/oggi/premium/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="S Intrattenimento",
|
||||
Item(channel=item.channel,
|
||||
title="S Intrattenimento Film",
|
||||
action="now_on_tv",
|
||||
url="%s/film-in-tv/oggi/sky-intrattenimento/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="S Cinema",
|
||||
Item(channel=item.channel,
|
||||
title="S Cinema Film",
|
||||
action="now_on_tv",
|
||||
url="%s/film-in-tv/oggi/sky-cinema/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="S Documentari",
|
||||
Item(channel=item.channel,
|
||||
title="S Documentari Film",
|
||||
action="now_on_tv",
|
||||
url="%s/film-in-tv/oggi/sky-doc-e-lifestyle/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
Item(channel=item.channel,
|
||||
title="Primafila",
|
||||
action="now_on_tv",
|
||||
url="%s/film-in-tv/oggi/sky-primafila/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="P",
|
||||
action="now_on_misc",
|
||||
url="%s/ora-in-onda/premium/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="S Intrattenimento",
|
||||
action="now_on_misc",
|
||||
url="%s/ora-in-onda/sky-intrattenimento/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="S Doc Lifestyle",
|
||||
action="now_on_misc",
|
||||
url="%s/ora-in-onda/sky-doc-e-lifestyle/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="S Intrattenimento",
|
||||
action="now_on_misc",
|
||||
url="%s/ora-in-onda/sky-intrattenimento/" % host,
|
||||
thumbnail=item.thumbnail)]
|
||||
|
||||
return itemlist
|
||||
|
||||
def now_on_misc(item):
|
||||
logger.info("filmontv tvoggi")
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
#patron = r'spanTitleMovie">([A-Za-z À-ÖØ-öø-ÿ\-\']*)[a-z \n<>\/="_\-:0-9;A-Z.]*GenresMovie">([\-\'A-Za-z À-ÖØ-öø-ÿ\/]*)[a-z \n<>\/="_\-:0-9;A-Z.%]*src="([a-zA-Z:\/\.0-9?]*)[a-z \n<>\/="_\-:0-9;A-Z.%\-\']*Year">([A-Z 0-9a-z]*)'
|
||||
patron = r'table-cell[;" ]*alt="([a-zA-Z 0-9\+,\.]*)"[a-z \n<>\/="_\-:0-9;A-Z.?!\'\&, \(\)#]*backdrop" alt="([A-Za-z: ,0-9\.À-ÖØ-öø-ÿ\&\#\-\']*)"[ ]*src="([A-Za-z: ,0-9\.À-ÖØ-öø-ÿ\/?=\-\']*)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedchannel, scrapedtitle, scrapedthumbnail in matches:
|
||||
# for scrapedthumbnail, scrapedtitle, scrapedtv in matches:
|
||||
scrapedurl = ""
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).strip()
|
||||
infoLabels = {}
|
||||
infoLabels["year"] = ""
|
||||
infoLabels['tvshowtitle'] = scrapedtitle
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="do_search",
|
||||
extra=urllib.quote_plus(scrapedtitle) + '{}' + 'tvshow',
|
||||
title="[B]" + scrapedtitle + "[/B] - " + scrapedchannel,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail.replace("?width=320", "?width=640"),
|
||||
contentTitle=scrapedtitle,
|
||||
contentType='tvshow',
|
||||
infoLabels=infoLabels,
|
||||
folder=True))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
def now_on_tv(item):
|
||||
logger.info("filmontv tvoggi")
|
||||
itemlist = []
|
||||
|
||||
Reference in New Issue
Block a user