diff --git a/channels.json b/channels.json index e5679664..dae59f1c 100644 --- a/channels.json +++ b/channels.json @@ -15,6 +15,7 @@ "discoveryplus": "https://www.discoveryplus.com", "dreamsub": "https://dreamsub.cc", "eurostreaming": "https://eurostreaming.rest", + "filmstreaming": "https://filmstreaming.media", "guardaseriecam": "https://guardaserie.cam", "guardaserieclick": "https://www.guardaserie.builders", "guardaserieicu": "https://guardaserie.ltd", diff --git a/channels/filmstreaming.json b/channels/filmstreaming.json new file mode 100644 index 00000000..54030798 --- /dev/null +++ b/channels/filmstreaming.json @@ -0,0 +1,10 @@ +{ + "id": "filmstreaming", + "name": "Film Streaming", + "language": ["ita"], + "active": true, + "thumbnail": "filmstreaming.png", + "banner": "filmstreaming.png", + "categories": ["movie"], + "settings": [] +} diff --git a/channels/filmstreaming.py b/channels/filmstreaming.py new file mode 100644 index 00000000..1d73759d --- /dev/null +++ b/channels/filmstreaming.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Canale per filmstreaming +# ------------------------------------------------------------ + +from core import support +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', + ('Al Cinema', ['/cinema', 'peliculas']), + ('Ultimi Inseriti', ['', 'peliculas', 'last']), + ('Generi', ['', 'genres', 'genres']), + ('Anno', ['', 'genres', 'years'])] + + return locals() + + +def search(item, text): + logger.debug('search', text) + itemlist = [] + text = text.replace(" ", "+") + item.url = f'{host}/index.php?do=search&subaction=search&story={text}' + + try: + return peliculas(item) + except: + import sys + for line in sys.exc_info(): + logger.error("search except: %s" % line) + return [] + + +def newest(categoria): + logger.debug(categoria) + + itemlist = [] + item = Item() + try: + if categoria == "peliculas": + item.url = host + item.action = "peliculas" + item.contentType = 'movie' + item.args = 'last' + itemlist = peliculas(item) + if itemlist[-1].action == "peliculas": + itemlist.pop() + # Continua la ricerca in caso di errore + except: + import sys + for line in sys.exc_info(): + logger.error("{0}".format(line)) + return [] + + return itemlist + + +@support.scrape +def peliculas(item): + if item.args == 'last': + patronBlock = r'inseriti:(?P.*?)
[^>]+>]+>]+>){6}(?P[^<]+)(?:[^>]+>){6}(?P<quality>[^<]+)' + patronNext = r'<a href="([^"]+)">&rarr' + return locals() + + +@support.scrape +def genres(item): + action = "peliculas" + _type ={'years':'Anno', 'genres':'Categorie'} + + patronBlock = f'{_type[item.args]}(?:[^>]+>){{4}}(?P<block>.*?)</ul>' + patronMenu = '<li><a href="(?P<url>[^"]+)">(?P<title>.*?)</a>' + + return locals() + + +def findvideos(item): + data = support.match(item.url).data + urls = support.match(data, patron=r'<span data-link="([^"]+)').matches + if urls: + data = urls + else: + url = support.match(item.url, patron='<iframe.*?src="([^"]+)').match + data = support.match(url).data + return support.server(item, data)