Aggiunto Altadefinizione (WIP)
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
"vvvvid": "https://www.vvvvid.it"
|
||||
},
|
||||
"findhost": {
|
||||
"altadefinizione":"https://altadefinizione.nuovo.live",
|
||||
"altadefinizionecommunity": "https://altaregistrazione.net",
|
||||
"animealtadefinizione": "https://www.animealtadefinizione.it",
|
||||
"filmpertutti": "https://filmpertuttiii.nuovo.live"
|
||||
|
||||
10
channels/altadefinizione.json
Normal file
10
channels/altadefinizione.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "altadefinizione",
|
||||
"name": "Altadefinizione",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"thumbnail": "altadefinizione.png",
|
||||
"banner": "altadefinizione.png",
|
||||
"categories": ["movie", "tvshow", "vos"],
|
||||
"settings": []
|
||||
}
|
||||
87
channels/altadefinizione.py
Normal file
87
channels/altadefinizione.py
Normal file
@@ -0,0 +1,87 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per altadefinizione
|
||||
# ------------------------------------------------------------
|
||||
|
||||
|
||||
from core import httptools, support
|
||||
from platformcode import config, logger
|
||||
|
||||
|
||||
def findhost(url):
|
||||
host = support.match(url, patron=r'<h2[^>]+><a href="([^"]+)').match.rstrip('/')
|
||||
return host
|
||||
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = [('Al Cinema', ['/al-cinema/', 'peliculas']),
|
||||
('Generi', ['', 'genres']),
|
||||
('Sub-ITA', ['/sub-ita/', 'peliculas'])]
|
||||
|
||||
tvshow = ['/genere/serie-tv/']
|
||||
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
action = 'peliculas'
|
||||
blacklist = ['Scegli il Genere', 'Film', 'Serie TV', 'Sub-Ita', 'Anime']
|
||||
patronMenu = r'<option value="(?P<url>[^"]+)">(?P<title>[^<]+)'
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.debug(text)
|
||||
item.url = "{}/?s={}".format(host, text)
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("search except: %s" % line)
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
item.contentType = "undefined"
|
||||
action = 'check'
|
||||
patron = r'src="(?P<thumb>http[^"]+)(?:[^>]+>){6,12}\s*<a href="(?P<url>[^"]+)[^>]+>\s*(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*</a>\s*</h2>'
|
||||
patronNext = r'href="([^"]+)[^>]+>»'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
item.quality = ''
|
||||
data = item.data
|
||||
action='findvideos'
|
||||
patronBlock = r'Stagione[^;]+;\s(?P<lang>(?:Sub-)?ITA)(?: in )?(?P<quality>[^<]*)?(?:[^>]+>){4}(?P<block>.*?)/p>'
|
||||
patron = r'(?P<season>\d+)&[^:]+;(?P<episode>\d+)(?P<data>.*?)(?:<br|$)'
|
||||
return locals()
|
||||
|
||||
|
||||
def check(item):
|
||||
item.data = httptools.downloadpage(item.url).data
|
||||
if 'rel="tag">Serie TV' in item.data:
|
||||
return episodios(item)
|
||||
else:
|
||||
return findvideos(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.debug()
|
||||
if item.contentType == 'movie':
|
||||
item.data = support.match(item.data, patron=r'data-id="([^"]+)').matches
|
||||
return support.server(item, item.data)
|
||||
Reference in New Issue
Block a user