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