Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -130,4 +130,4 @@ def newest(categoria):
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
return itemlist
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "altadefinizione01_club",
|
||||
"name": "Altadefinizione01 C",
|
||||
"active": false,
|
||||
"active": "enable",
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"fanart": "https://www.altadefinizione01.vision/templates/Darktemplate/images/logo.png",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# -*- By Greko -*-
|
||||
|
||||
from specials import autoplay
|
||||
from core import servertools, support, jsontools
|
||||
from core import servertools, support#, jsontools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
@@ -22,16 +22,16 @@ def mainlist(item):
|
||||
## support.dbg()
|
||||
|
||||
film = [
|
||||
('Al Cinema', ['/film-del-cinema', 'peliculas','']),
|
||||
('Generi', ['', 'genres', 'genres', '']),
|
||||
('Anni', ['', 'genres', 'years', '']),
|
||||
('Qualità', ['/piu-visti.html', 'genres', 'quality', '']),
|
||||
('Mi sento fortunato', ['/piu-visti.html', 'genres', 'lucky', '']),
|
||||
('Popolari', ['/piu-visti.html', 'peliculas', '', '']),
|
||||
('Sub-ITA', ['/sub-ita/', 'peliculas', '', ''])
|
||||
('Al Cinema', ['/film-del-cinema', 'peliculas', '']),
|
||||
('Generi', ['', 'genres', 'genres']),
|
||||
('Anni', ['', 'genres', 'years']),
|
||||
('Qualità', ['/piu-visti.html', 'genres', 'quality']),
|
||||
('Mi sento fortunato', ['/piu-visti.html', 'genres', 'lucky']),
|
||||
('Popolari', ['/piu-visti.html', 'peliculas', '']),
|
||||
('Sub-ITA', ['/film-sub-ita/', 'peliculas', ''])
|
||||
]
|
||||
|
||||
search = ''
|
||||
## search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
@@ -39,26 +39,28 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
#import web_pdb; web_pdb.set_trace()
|
||||
## support.dbg()
|
||||
support.log('peliculas',item)
|
||||
itemlist = []
|
||||
|
||||
patron = r'class="innerImage">.*?href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"'\
|
||||
'.*?class="ml-item-title">(?P<title>[^<]+)</.*?class="ml-item-label"> '\
|
||||
'(?P<year>\d{4}) <.*?class="ml-item-label"> (?P<duration>\d+) .*?'\
|
||||
'class="ml-item-label ml-item-label-.+?"> (?P<quality>.+?) <.*?'\
|
||||
'class="ml-item-label"> (?P<lang>.+?) </'
|
||||
## patron = r'class="innerImage">.*?href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"'\
|
||||
## '.*?class="ml-item-title">(?P<title>[^<]+)</.*?class="ml-item-label"> '\
|
||||
## '(?P<year>\d{4}) <.*?class="ml-item-label"> (?P<duration>\d+) .*?'\
|
||||
## 'class="ml-item-label ml-item-label-.+?"> (?P<quality>.+?) <.*?'\
|
||||
## 'class="ml-itelangm-label"> (?P<lang>.+?) </'
|
||||
|
||||
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="([^"]+)">'
|
||||
## debug = True
|
||||
|
||||
return locals()
|
||||
|
||||
# =========== def pagina categorie ======================================
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.log
|
||||
support.log('genres',item)
|
||||
|
||||
action = 'peliculas'
|
||||
## item.contentType = 'movie'
|
||||
if item.args == 'genres':
|
||||
patronBlock = r'<ul class="listSubCat" id="Film">(?P<block>.*)</ul>'
|
||||
elif item.args == 'years':
|
||||
@@ -68,9 +70,9 @@ def genres(item):
|
||||
elif item.args == 'lucky': # sono i titoli random nella pagina, cambiano 1 volta al dì
|
||||
patronBlock = r'FILM RANDOM.*?class="listSubCat">(?P<block>.*)</ul>'
|
||||
action = 'findvideos'
|
||||
|
||||
## item.args = ''
|
||||
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
|
||||
|
||||
return locals()
|
||||
|
||||
# =========== def per cercare film/serietv =============
|
||||
@@ -82,7 +84,7 @@ def search(item, text):
|
||||
item.url = host+"/index.php?do=search&story=%s&subaction=search" % (text)
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Se captura la excepciÛn, para no interrumpir al buscador global si un canal falla
|
||||
# Se captura la excepcion, para no interrumpir al buscador global si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -112,6 +114,5 @@ def newest(categoria):
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
return support.server(item, headers=headers)
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "https:\/\/guardogratis.com\/wp-content\/uploads\/2018\/01\/Logo-4.png",
|
||||
"bannermenu": "https:\/\/guardogratis.com\/wp-content\/uploads\/2018\/01\/Logo-4.png",
|
||||
"thumbnail": "",
|
||||
"bannermenu": "",
|
||||
"categories": ["movie","tvshow"],
|
||||
"settings": [
|
||||
{
|
||||
|
||||
@@ -111,7 +111,7 @@ def dbg():
|
||||
import web_pdb;
|
||||
if not web_pdb.WebPdb.active_instance:
|
||||
import webbrowser
|
||||
webbrowser.open('http://localhost:5555')
|
||||
webbrowser.open('http://127.0.0.1:5555')
|
||||
web_pdb.set_trace()
|
||||
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ class Kdicc():
|
||||
for sito in lst_urls:
|
||||
rslt = {}
|
||||
try:
|
||||
r = requests.head(sito, allow_redirects = True, timeout=7) # da errore dopo l'inserimento in lib di httplib2
|
||||
r = requests.head(sito, allow_redirects = True)#, timeout=7) # da errore dopo l'inserimento in lib di httplib2
|
||||
if r.url.endswith('/'):
|
||||
r.url = r.url[:-1]
|
||||
if str(sito) != str(r.url):
|
||||
@@ -288,3 +288,10 @@ def check_channels(inutile=''):
|
||||
with open(folderJson+'/'+fileJson_test, 'w') as f:
|
||||
data = json.dump(risultato, f, sort_keys=True, indent=4)
|
||||
logger.info(data)
|
||||
|
||||
# codice per l'invio del file su git!!!
|
||||
|
||||
# 1. Bottone OKNO richiesta se vuole inviare file
|
||||
# 2. Maschera per le credenziali di Github
|
||||
# 3. Invio file
|
||||
# 4. Esci
|
||||
|
||||
Reference in New Issue
Block a user