diff --git a/channels.json b/channels.json index 90aa18df..ff3f81c7 100644 --- a/channels.json +++ b/channels.json @@ -22,6 +22,7 @@ "ilcorsaronero": "https://ilcorsaronero.link", "ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.foo", "italiafilm": "https://italia-film.biz", + "lordchannel": "https://lordchannel.com", "mediasetplay": "https://mediasetinfinity.mediaset.it", "mondoserietv": "http://ww25.mondoserietv.club/?subid1=20230304-0434-261c-9cb0-a0044930e0a9", "paramount": "https://www.mtv.it", diff --git a/channels/lordchannel.json b/channels/lordchannel.json new file mode 100644 index 00000000..53942fe6 --- /dev/null +++ b/channels/lordchannel.json @@ -0,0 +1,10 @@ +{ + "id": "lordchannel", + "name": "LordChannel", + "active": true, + "language": ["ita", "sub-ita"], + "thumbnail": "lordchannel.png", + "banner": "lordchannel.png", + "categories": ["anime", "tvshow", "movie"], + "settings": [] +} diff --git a/channels/lordchannel.py b/channels/lordchannel.py new file mode 100644 index 00000000..2700c679 --- /dev/null +++ b/channels/lordchannel.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Canale per lordchannel.py +# ------------------------------------------------------------ + +from core import httptools, support, scrapertools +from core.item import Item +from platformcode import config, logger + +host = config.get_channel_url() +headers = [['Referer', host]] + +@support.menu +def mainlist(item): + + film = ['/film/', + ] + tvshow = ['/serietv/', + ] + + anime = ['/anime/anime-ita/', + ('Anime SUB-Ita', ['/anime/anime-sub-ita/','peliculas']), + ] + search = '' + return locals() + + +@support.scrape +def peliculas(item): + if item.args == 'search': + action = 'check' + patron= r'
[^"]+).*?[^"]+).*?>(?P.*?)</a' + patronNext = r'<li class="paginator__item paginator__item--next">.*?href="(?P<url>[^"]+)' + return locals() + +@support.scrape +def episodios(item): + patronBlock=r'<div class="accordion__card.*?<span>.*?:\s*(?P<season>\d*?)\s*</span>(?P<block>.*?)</table>' + patron=r'<tr>\s<th class="episode-link".*?href="(?P<url>[^"]+).*?>(?P<episode>\d+).*?_blank">(?P<title>.*?)</a>' + downloadEnabled = False + return locals() + +def check(item): + item.data = httptools.downloadpage(item.url).data + if 'episode-link' in item.data.lower(): + item.contentType = 'tvshow' + return episodios(item) + else: + item.contentType = 'movie' + return findvideos(item) + + +def search(item, text): + item.url = "{}/cerca/?{}".format(host, support.urlencode({'q': text})) + item.args = 'search' + + try: + return peliculas(item) + + except: + import sys + for line in sys.exc_info(): + logger.error("search except: %s" % line) + return [] + +def findvideos(item): + video_url = item.url + + if item.contentType == 'movie': + video_url = support.match(video_url, patron=r'<a\shref="(?P<url>[^"]+)"\sclass="btn-streaming streaming_btn">').match + + video_url = support.match(video_url, patron=r'<video-js.*?src="(?P<url>[^"]+)').match + + if (video_url == ''): + return [] + + item = item.clone(server='directo', url=video_url, no_return=True) + return support.server(item,itemlist=[item], Download=False, Videolibrary=False)