fix: altadefinizione01 e support
il canale è stato aggiornato per il file .json senza valori in settings support modificata la linea 223 altrimenti non prende i gruppi delle regex
This commit is contained in:
@@ -1,62 +1,11 @@
|
|||||||
{
|
{
|
||||||
"id": "altadefinizione01",
|
"id": "altadefinizione01",
|
||||||
"name": "Altadefinizione01",
|
"name": "Altadefinizione01",
|
||||||
"language": ["ita"],
|
"language": ["ita", "vos"],
|
||||||
"active": true,
|
"active": true,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/altadefinizione01.png",
|
"thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/altadefinizione01.png",
|
||||||
"banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/altadefinizione01.png",
|
"banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/altadefinizione01.png",
|
||||||
"categories": ["movie"],
|
"categories": ["movie"],
|
||||||
"settings": [
|
"settings": []
|
||||||
{
|
|
||||||
"id": "include_in_global_search",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Includi in Ricerca Globale",
|
|
||||||
"default": false,
|
|
||||||
"enabled": false,
|
|
||||||
"visible": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "include_in_newest_peliculas",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Includi in Novità - Film",
|
|
||||||
"default": true,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "include_in_newest_italiano",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Includi in Novità - Italiano",
|
|
||||||
"default": true,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "checklinks",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Verifica se i link esistono",
|
|
||||||
"default": false,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "checklinks_number",
|
|
||||||
"type": "list",
|
|
||||||
"label": "Numero di link da verificare",
|
|
||||||
"default": 1,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": "eq(-1,true)",
|
|
||||||
"lvalues": [ "5", "10", "15", "20" ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "filter_languages",
|
|
||||||
"type": "list",
|
|
||||||
"label": "Mostra link in lingua...",
|
|
||||||
"default": 0,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true,
|
|
||||||
"lvalues": ["Non filtrare","IT"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,24 +2,28 @@
|
|||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Canale per altadefinizione01
|
# Canale per altadefinizione01
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
import xbmc
|
||||||
|
from core import scrapertoolsV2, httptools, support
|
||||||
"""
|
|
||||||
DA FINIRE - CONTROLLARE
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
##from specials import autoplay
|
|
||||||
from core import support #,servertools
|
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
|
|
||||||
__channel__ = "altadefinizione01"
|
__channel__ = "altadefinizione01"
|
||||||
|
|
||||||
host = config.get_channel_url(__channel__)
|
#impostati dinamicamente da findhost()
|
||||||
|
host = ""
|
||||||
|
headers = ""
|
||||||
|
|
||||||
headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
def findhost():
|
||||||
['Referer', host]]
|
global host, headers
|
||||||
|
data = httptools.downloadpage('https://altadefinizione01-nuovo.link/').data
|
||||||
|
host = scrapertoolsV2.find_single_match(data, '<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||||
|
xbmc.log("host vale: %s" % host, level=xbmc.LOGNOTICE)
|
||||||
|
headers = [['Referer', host]]
|
||||||
|
|
||||||
|
#host = config.get_channel_url(__channel__)
|
||||||
|
|
||||||
|
#headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||||
|
# ['Referer', host]]
|
||||||
|
|
||||||
list_servers = ['verystream','openload','rapidvideo','streamango']
|
list_servers = ['verystream','openload','rapidvideo','streamango']
|
||||||
list_quality = ['default']
|
list_quality = ['default']
|
||||||
@@ -27,9 +31,10 @@ list_quality = ['default']
|
|||||||
|
|
||||||
@support.menu
|
@support.menu
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
|
findhost()
|
||||||
film = [
|
film = [
|
||||||
('Al Cinema', ['/cinema/', 'peliculas', 'pellicola']),
|
('Al Cinema', ['/cinema/', 'peliculas', 'pellicola']),
|
||||||
|
('Ultimi Aggiornati-Aggiunti', ['','peliculas', 'update']),
|
||||||
('Generi', ['', 'categorie', 'genres']),
|
('Generi', ['', 'categorie', 'genres']),
|
||||||
('Lettera', ['/catalog/a/', 'categorie', 'orderalf']),
|
('Lettera', ['/catalog/a/', 'categorie', 'orderalf']),
|
||||||
('Anni', ['', 'categorie', 'years']),
|
('Anni', ['', 'categorie', 'years']),
|
||||||
@@ -41,44 +46,49 @@ def mainlist(item):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
support.log('peliculas',item)
|
support.log('peliculas',item)
|
||||||
## support.dbg()
|
|
||||||
action="findvideos"
|
action="findvideos"
|
||||||
|
|
||||||
if item.args == "search":
|
if item.args == "search":
|
||||||
patronBlock = r'</script> <div class="boxgrid caption">(?P<block>.*)<div id="right_bar">'
|
patronBlock = r'</script> <div class="boxgrid caption">(?P<block>.*)<div id="right_bar">'
|
||||||
|
elif item.args == 'update':
|
||||||
|
patronBlock = r'<div class="widget-title">Ultimi Film Aggiunti/Aggiornati</div>(?P<block>.*?)<div id="alt_menu">'
|
||||||
|
patron = r'style="background-image:url\((?P<thumb>[^\)]+).+?<p class="h4">'\
|
||||||
|
'(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> '\
|
||||||
|
'[^>]+> [^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>'\
|
||||||
|
'(?P<duration>\d+).+?>.*?<p>(?P<plot>[^<]+)<.*?href="(?P<url>[^"]+)'
|
||||||
else:
|
else:
|
||||||
patronBlock = r'<div class="cover_kapsul ml-mask">(?P<block>.*)<div class="page_nav">'
|
patronBlock = r'<div class="cover_kapsul ml-mask">(?P<block>.*)<div class="page_nav">'
|
||||||
|
|
||||||
patron = r'<div class="cover boxcaption"> <h2>.<a href="(?P<url>[^"]+)">.*?<.*?src="(?P<thumb>[^"]+)"'\
|
patron = r'<div class="cover boxcaption"> <h2>.<a href="(?P<url>[^"]+)">.*?<.*?src="(?P<thumb>[^"]+)"'\
|
||||||
'.+?[^>]+>[^>]+<div class="trdublaj"> (?P<quality>[A-Z/]+)<[^>]+>(?:.[^>]+>(?P<lang>.*?)<[^>]+>).*?'\
|
'.+?[^>]+>[^>]+<div class="trdublaj"> (?P<quality>[A-Z/]+)<[^>]+>(?:.[^>]+>(?P<lang>.*?)<[^>]+>).*?'\
|
||||||
'<p class="h4">(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> [^>]+> '\
|
'<p class="h4">(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> [^>]+> '\
|
||||||
'[^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>(?P<duration>\d+).+?>.*?<p>(?P<plot>[^<]+)<'
|
'[^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>(?P<duration>\d+).+?>.*?<p>(?P<plot>[^<]+)<'
|
||||||
|
|
||||||
patronNext = '<span>\d</span> <a href="([^"]+)">'
|
|
||||||
|
|
||||||
## support.regexDbg(item, patron, headers)
|
patronNext = '<span>\d</span> <a href="([^"]+)">'
|
||||||
|
debug = True
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def categorie(item):
|
def categorie(item):
|
||||||
support.log('categorie',item)
|
support.log('categorie',item)
|
||||||
|
findhost()
|
||||||
if item.args != 'orderalf': action = "peliculas"
|
if item.args != 'orderalf': action = "peliculas"
|
||||||
else: action = 'orderalf'
|
else: action = 'orderalf'
|
||||||
|
|
||||||
blacklist = ['Altadefinizione01']
|
blacklist = ['Altadefinizione01']
|
||||||
|
|
||||||
if item.args == 'genres':
|
if item.args == 'genres':
|
||||||
patronBlock = r'<ul class="kategori_list">(?P<block>.*)<div class="tab-pane fade" id="wtab2">'
|
patronBlock = r'<ul class="kategori_list">(?P<block>.*?)<div class="tab-pane fade" id="wtab2">'
|
||||||
patron = '<li><a href="(?P<url>[^"]+)">(?P<title>.*?)</a>'
|
patron = '<li><a href="(?P<url>[^"]+)">(?P<title>.*?)</a>'
|
||||||
elif item.args == 'years':
|
elif item.args == 'years':
|
||||||
patronBlock = r'<ul class="anno_list">(?P<block>.*)</a></li> </ul> </div>'
|
patronBlock = r'<ul class="anno_list">(?P<block>.*?)</a></li> </ul> </div>'
|
||||||
patron = '<li><a href="(?P<url>[^"]+)">(?P<title>.*?)</a>'
|
patron = '<li><a href="(?P<url>[^"]+)">(?P<title>.*?)</a>'
|
||||||
elif item.args == 'orderalf':
|
elif item.args == 'orderalf':
|
||||||
patronBlock = r'<div class="movies-letter">(?P<block>.*)<div class="clearfix">'
|
patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">'
|
||||||
patron = '<a title=.*?href="(?P<url>[^"]+)"><span>(?P<title>.*?)</span>'
|
patron = '<a title=.*?href="(?P<url>[^"]+)"><span>(?P<title>.*?)</span>'
|
||||||
|
|
||||||
#support.regexDbg(item, patronBlock, headers)
|
#support.regexDbg(item, patronBlock, headers)
|
||||||
|
|
||||||
|
#debug = True
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
|
|||||||
+3
-4
@@ -197,7 +197,6 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
|||||||
val = scrapertoolsV2.find_single_match(item.url, 'https?://[a-z0-9.-]+') + val
|
val = scrapertoolsV2.find_single_match(item.url, 'https?://[a-z0-9.-]+') + val
|
||||||
scraped[kk] = val
|
scraped[kk] = val
|
||||||
|
|
||||||
|
|
||||||
episode = re.sub(r'\s-\s|-|x|–|×', 'x', scraped['episode']) if scraped['episode'] else ''
|
episode = re.sub(r'\s-\s|-|x|–|×', 'x', scraped['episode']) if scraped['episode'] else ''
|
||||||
title = cleantitle(scraped['title']) if scraped['title'] else ''
|
title = cleantitle(scraped['title']) if scraped['title'] else ''
|
||||||
title2 = cleantitle(scraped['title2']) if scraped['title2'] else ''
|
title2 = cleantitle(scraped['title2']) if scraped['title2'] else ''
|
||||||
@@ -220,7 +219,8 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
|||||||
lang = ''
|
lang = ''
|
||||||
|
|
||||||
# if title is set, probably this is a list of episodes or video sources
|
# if title is set, probably this is a list of episodes or video sources
|
||||||
if item.infoLabels["title"]:
|
# necessaria l'aggiunta di == scraped["title"] altrimenti non prende lo scraped dopo le categorie
|
||||||
|
if item.infoLabels["title"] == scraped["title"]:
|
||||||
infolabels = item.infoLabels
|
infolabels = item.infoLabels
|
||||||
else:
|
else:
|
||||||
infolabels = {}
|
infolabels = {}
|
||||||
@@ -253,8 +253,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
|||||||
if str(scraped['type']).lower() in variants:
|
if str(scraped['type']).lower() in variants:
|
||||||
AC = name
|
AC = name
|
||||||
else: AC = action
|
else: AC = action
|
||||||
|
|
||||||
|
|
||||||
if (scraped["title"] not in blacklist) and (search.lower() in longtitle.lower()):
|
if (scraped["title"] not in blacklist) and (search.lower() in longtitle.lower()):
|
||||||
it = Item(
|
it = Item(
|
||||||
channel=item.channel,
|
channel=item.channel,
|
||||||
|
|||||||
Reference in New Issue
Block a user