fix: migliorie altadefinizione01_L e modifica a support

This commit is contained in:
greko17
2019-09-06 12:02:00 +02:00
parent e151f0977e
commit b876679619
3 changed files with 16 additions and 92 deletions

View File

@@ -3,88 +3,9 @@
"name": "Altadefinizione01 L",
"active": true,
"adult": false,
"language": ["ita"],
"language": ["ita","vos"],
"thumbnail": "altadefinizione01_L.png",
"banner": "altadefinizione01_L.png",
"categories": ["movie","vosi"],
"settings": [
{
"id": "modo_grafico",
"type": "bool",
"label": "Cerca informazioni extra",
"default": true,
"enabled": true,
"visible": true
},
{
"id": "include_in_newest_peliculas",
"type": "bool",
"label": "Includi in Novità",
"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": "include_in_global_search",
"type": "bool",
"label": "Includi ricerca globale",
"default": true,
"enabled": true,
"visible": true
},
{
"id": "checklinks",
"type": "bool",
"label": "Verifica se i link esistono",
"default": true,
"enabled": true,
"visible": true
},
{
"id": "checklinks_number",
"type": "list",
"label": "Numero de 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",
"ITA",
"vosi"
]
},
{
"id": "perfil",
"type": "list",
"label": "profilo dei colori",
"default": 0,
"enabled": true,
"visible": true,
"lvalues": [
"Sin color",
"Perfil 5",
"Perfil 4",
"Perfil 3",
"Perfil 2",
"Perfil 1"
]
}
]
"categories": ["movie","vos"],
"settings" :[]
}

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# -*- Channel Altadefinizione01L Film - Serie -*-
# -*- Channel Altadefinizione01L Film -*-
# -*- By Greko -*-
from core import support
@@ -38,9 +38,9 @@ def peliculas(item):
## support.dbg()
support.log('peliculas',item)
patron = r'class="innerImage">.*?href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> (?P<year>\d{4})[^>]+>[^>]+> (?P<duration>\d+)[^>]+>[^>]+> (?P<quality>[a-zA-Z\\]+)[^>]+>[^>]+> (?P<lang>.*?) [^>]+>'
patronNext = '<span>\d</span> <a href="([^"]+)">'
patronNext = r'<span>\d</span> <a href="([^"]+)">'
## debug = True
return locals()
return locals()
# =========== def pagina categorie ======================================
@support.scrape
@@ -58,13 +58,13 @@ def genres(item):
patronBlock = r'FILM RANDOM.*?class="listSubCat">(?P<block>.*)</ul>'
action = 'findvideos'
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
return locals()
return locals()
# =========== def per cercare film/serietv =============
#host+/index.php?do=search&story=avatar&subaction=search
def search(item, text):
support.log()
support.log('search', item)
itemlist = []
text = text.replace(" ", "+")
item.url = host+"/index.php?do=search&story=%s&subaction=search" % (text)
@@ -80,7 +80,7 @@ def search(item, text):
# =========== def per le novità nel menu principale =============
def newest(categoria):
support.log(categoria)
support.log('newest', categoria)
itemlist = []
item = Item()
try:

View File

@@ -153,13 +153,16 @@ def scrape2(item, patron = '', listGroups = [], headers="", blacklist="", data="
def scrapeLang(scraped, lang, longtitle):
## Aggiunto/modificato per gestire i siti che hanno i video
## in ita e subita delle serie tv nella stessa pagina
# altrimenti dopo un sub-ita mette tutti quelli a seguire in sub-ita
# e credo sia utile per filtertools
lang = 'ITA'
if scraped['lang']:
if 'sub' in scraped['lang'].lower():
lang = 'Sub-ITA'
elif 'ita' in scraped['lang'].lower():
lang = 'ITA'
if lang != '':
longtitle += typo(lang, '_ [] color kod')
longtitle += typo(lang, '_ [] color kod')
return lang, longtitle
@@ -951,4 +954,4 @@ def channel_config(item, itemlist):
def extract_wrapped(decorated):
from types import FunctionType
closure = (c.cell_contents for c in decorated.__closure__)
return next((c for c in closure if isinstance(c, FunctionType)), None)
return next((c for c in closure if isinstance(c, FunctionType)), None)