From 4805152a7d58e059f28cb2fc74e2ae59c81cbf08 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Fri, 4 Mar 2022 17:40:06 +0100 Subject: [PATCH] Nuovo Canale Film Streaming --- channels.json | 1 + channels/filmstreaming.json | 10 ++++ channels/filmstreaming.py | 93 +++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 channels/filmstreaming.json create mode 100644 channels/filmstreaming.py 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.*?)