fix: checkhost
ReadTimeout: HTTPSConnectionPool(host='filmsenzalimiti.best', port=443): Read timed out. (read timeout=7)
This commit is contained in:
@@ -66,7 +66,7 @@ def categorie(item):
|
||||
|
||||
if item.args != 'orderalf': action = "peliculas"
|
||||
else: action = 'orderalf'
|
||||
blacklist = 'altadefinizione01'
|
||||
blacklist = ['Altadefinizione01']
|
||||
|
||||
if item.args == 'genres':
|
||||
patronBlock = r'<ul class="kategori_list">(?P<block>.*)</ul>'
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -5,23 +5,15 @@
|
||||
# -*- last change: 04/05/2019
|
||||
# -*- doppione di altadefinizione01
|
||||
|
||||
from specials import autoplay
|
||||
from core import servertools, support
|
||||
|
||||
from specials.canale import Channel
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
__channel__ = "altadefinizione01_club"
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
chan = Channel(itemlist)
|
||||
|
||||
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_quality = ['default']
|
||||
|
||||
@support.menu
|
||||
@canale.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = [
|
||||
('Al Cinema', ['/cinema/', 'peliculas', 'pellicola']),
|
||||
('Generi', ['', 'categorie', 'genres']),
|
||||
@@ -130,5 +122,130 @@ def newest(categoria):
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
##from specials import autoplay
|
||||
##from core import servertools, support
|
||||
##from core.item import Item
|
||||
##from platformcode import config, logger
|
||||
##
|
||||
##__channel__ = "altadefinizione01_club"
|
||||
##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_quality = ['default']
|
||||
##
|
||||
##@support.menu
|
||||
##def mainlist(item):
|
||||
##
|
||||
## film = [
|
||||
## ('Al Cinema', ['/cinema/', 'peliculas', 'pellicola']),
|
||||
## ('Generi', ['', 'categorie', 'genres']),
|
||||
## ('Lettera', ['/catalog/a/', 'categorie', 'orderalf']),
|
||||
## ('Anni', ['', 'categorie', 'years']),
|
||||
## ('Sub-ITA', ['/sub-ita/', 'peliculas', 'pellicola'])
|
||||
## ]
|
||||
##
|
||||
## return locals()
|
||||
##
|
||||
### ======== def in ordine di menu ===========================
|
||||
### =========== def per vedere la lista dei film =============
|
||||
##@support.scrape
|
||||
##def peliculas(item):
|
||||
#### import web_pdb; web_pdb.set_trace()
|
||||
## support.log('peliculas',item)
|
||||
##
|
||||
## action="findvideos"
|
||||
## if item.args == "search":
|
||||
## patronBlock = r'</script> <div class="boxgrid caption">(.*?)<div id="right_bar">'
|
||||
## else:
|
||||
## patronBlock = r'<div class="cover_kapsul ml-mask">(.*?)<div class="page_nav">'
|
||||
## patron = r'<div class="cover boxcaption"> <h2>.<a href="(?P<url>[^"]+)">.*?<.*?src="(?P<thumb>[^"]+)"'\
|
||||
## '.+?[^>]+>[^>]+<div class="trdublaj"> (?P<quality>[A-Z]+)<[^>]+>(?:.[^>]+>(?P<lang>.*?)<[^>]+>).*?'\
|
||||
## '<p class="h4">(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> [^>]+> '\
|
||||
## '[^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>(?P<duration>\d+).+?>'
|
||||
##
|
||||
## patronNext = '<span>\d</span> <a href="([^"]+)">'
|
||||
##
|
||||
## return locals()
|
||||
##
|
||||
### =========== def pagina categorie ======================================
|
||||
##
|
||||
##@support.scrape
|
||||
##def categorie(item):
|
||||
## support.log('categorie',item)
|
||||
#### import web_pdb; web_pdb.set_trace()
|
||||
##
|
||||
## if item.args != 'orderalf': action = "peliculas"
|
||||
## else: action = 'orderalf'
|
||||
## blacklist = 'Altadefinizione01'
|
||||
##
|
||||
## if item.args == 'genres':
|
||||
## patronBlock = r'<ul class="kategori_list">(.*?)</ul>'
|
||||
## patron = '<li><a href="(?P<url>[^"]+)">(?P<title>.*?)</a>'
|
||||
## elif item.args == 'years':
|
||||
## patronBlock = r'<ul class="anno_list">(.*?)</ul>'
|
||||
## patron = '<li><a href="(?P<url>[^"]+)">(?P<title>.*?)</a>'
|
||||
## elif item.args == 'orderalf':
|
||||
## patronBlock = r'<div class="movies-letter">(.*)<div class="clearfix">'
|
||||
## patron = '<a title=.*?href="(?P<url>[^"]+)"><span>(?P<title>.*?)</span>'
|
||||
##
|
||||
## return locals()
|
||||
### =========== def pagina lista alfabetica ===============================
|
||||
##@support.scrape
|
||||
##def orderalf(item):
|
||||
## support.log('orderalf',item)
|
||||
##
|
||||
## action= 'findvideos'
|
||||
## patron = r'<td class="mlnh-thumb"><a href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"'\
|
||||
## '.+?[^>]+>[^>]+ [^>]+[^>]+ [^>]+>(?P<title>[^<]+).*?[^>]+>(?P<year>\d{4})<'\
|
||||
## '[^>]+>[^>]+>(?P<quality>[A-Z]+)[^>]+> <td class="mlnh-5">(?P<lang>.*?)</td>'
|
||||
## patronNext = r'<span>[^<]+</span>[^<]+<a href="(.*?)">'
|
||||
##
|
||||
## return locals()
|
||||
### =========== def pagina del film con i server per verderlo =============
|
||||
##
|
||||
##def findvideos(item):
|
||||
## support.log('findvideos', item)
|
||||
## return support.server(item, headers=headers)
|
||||
##
|
||||
### =========== def per cercare film/serietv =============
|
||||
###http://altadefinizione01.link/index.php?do=search&story=avatar&subaction=search
|
||||
##def search(item, text):
|
||||
## logger.info("%s mainlist search log: %s %s" % (__channel__, item, text))
|
||||
## itemlist = []
|
||||
## text = text.replace(" ", "+")
|
||||
## item.url = host + "/index.php?do=search&story=%s&subaction=search" % (text)
|
||||
## item.args = "search"
|
||||
## try:
|
||||
## return peliculas(item)
|
||||
## # Cattura la eccezione così non interrompe la ricerca globle se il canale si rompe!
|
||||
## except:
|
||||
## import sys
|
||||
## for line in sys.exc_info():
|
||||
## logger.error("%s Sono qua: %s" % (__channel__, line))
|
||||
## return []
|
||||
##
|
||||
### =========== def per le novità nel menu principale =============
|
||||
##
|
||||
##def newest(categoria):
|
||||
## support.log(categoria)
|
||||
## itemlist = []
|
||||
## item = Item()
|
||||
## try:
|
||||
## if categoria == "peliculas":
|
||||
## item.url = host
|
||||
## item.action = "peliculas"
|
||||
## itemlist = peliculas(item)
|
||||
##
|
||||
## if itemlist[-1].action == "peliculas":
|
||||
## itemlist.pop()
|
||||
## # Continua la ricerca in caso di errore
|
||||
## except:
|
||||
## import sys
|
||||
## for line in sys.exc_info():
|
||||
## logger.error("{0}".format(line))
|
||||
## return []
|
||||
##
|
||||
## return itemlist
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,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):
|
||||
@@ -289,3 +289,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