get_channel_url migliorato
This commit is contained in:
@@ -76,8 +76,7 @@ def findhost():
|
||||
# cancellare host non utilizzato
|
||||
host = scrapertoolsV2.find_single_match(permUrl, r'<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
headers = [['Referer', host]]
|
||||
|
||||
findhost() # così le imposta una volta per tutte
|
||||
# così le imposta una volta per tutte
|
||||
### fine findhost
|
||||
|
||||
# server di esempio...
|
||||
|
||||
@@ -33,7 +33,7 @@ list_quality = ['default']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
findhost()
|
||||
|
||||
film = [
|
||||
('Al Cinema', ['/cinema/', 'peliculas', 'pellicola']),
|
||||
('Ultimi Aggiornati-Aggiunti', ['','peliculas', 'update']),
|
||||
@@ -48,7 +48,7 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log('peliculas',item)
|
||||
findhost()
|
||||
|
||||
## deflang = 'ITA'
|
||||
action="findvideos"
|
||||
|
||||
@@ -106,7 +106,7 @@ def orderalf(item):
|
||||
|
||||
def search(item, text):
|
||||
support.log(item, text)
|
||||
findhost()
|
||||
|
||||
|
||||
itemlist = []
|
||||
text = text.replace(" ", "+")
|
||||
@@ -123,7 +123,7 @@ def search(item, text):
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
findhost()
|
||||
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
|
||||
@@ -21,9 +21,7 @@ from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
__channel__ = 'altadefinizioneclick'
|
||||
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
list_servers = ['verystream', 'rapidvideo', 'openload', 'streamango', 'vidoza',
|
||||
'vidcloud', 'thevideo', 'okru', 'hdload', 'youtube']
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
from servers.decrypters import adfly
|
||||
from core import support
|
||||
|
||||
__channel__ = "animeforce"
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
from core import support
|
||||
from lib.js2py.host import jsfunctions
|
||||
|
||||
__channel__ = "animeleggendari"
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
['Referer', host]]
|
||||
|
||||
@@ -15,8 +15,7 @@ from platformcode import logger, config
|
||||
from specials import autoplay
|
||||
from specials import renumbertools
|
||||
|
||||
__channel__ = "animespace"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
|
||||
checklinks = config.get_setting('checklinks', 'animespace')
|
||||
checklinks_number = config.get_setting('checklinks_number', 'animespace')
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
from core import support
|
||||
|
||||
__channel__ = "animesubita"
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
host = support.config.get_channel_url()
|
||||
headers = {'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0'}
|
||||
|
||||
list_servers = ['directo']
|
||||
|
||||
@@ -6,8 +6,7 @@ import re
|
||||
import urllib
|
||||
from core import support
|
||||
|
||||
__channel__ = "animetubeita"
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
headers = {'Upgrade-Insecure-Requests': '1',
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0'}
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
from core import support, jsontools
|
||||
|
||||
__channel__ = "animeworld"
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
host = support.config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['animeworld', 'verystream', 'streamango', 'openload', 'directo']
|
||||
|
||||
@@ -29,8 +29,7 @@ from core.item import Item
|
||||
|
||||
|
||||
##### fine import
|
||||
__channel__ = "casacinema"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['verystream', 'openload', 'wstream', 'speedvideo']
|
||||
|
||||
+10
-12
@@ -22,18 +22,16 @@ from core import support
|
||||
from core import scrapertoolsV2, httptools
|
||||
from core.item import Item
|
||||
|
||||
host = "https://casacinema.stream"
|
||||
headers = ""
|
||||
|
||||
def findhost():
|
||||
pass
|
||||
# global host, headers
|
||||
# data = httptools.downloadpage('https://casacinema.nuovo.link').data
|
||||
# host = scrapertoolsV2.find_single_match(data, r'<div class="elementor-widget-container"><div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
# headers = [['Referer', host]]
|
||||
# if host.endswith('/'):
|
||||
# host = host[:-1]
|
||||
data = httptools.downloadpage('https://casacinema.nuovo.link').data
|
||||
host = scrapertoolsV2.find_single_match(data, r'<div class="elementor-widget-container"><div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
if host.endswith('/'):
|
||||
host = host[:-1]
|
||||
return host
|
||||
|
||||
host = support.config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['supervideo', 'streamcherry','rapidvideo', 'streamango', 'openload']
|
||||
list_quality = ['default', 'HD', '3D', '4K', 'DVD', 'SD']
|
||||
@@ -41,7 +39,7 @@ list_quality = ['default', 'HD', '3D', '4K', 'DVD', 'SD']
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log(item)
|
||||
findhost()
|
||||
|
||||
film = ['',
|
||||
('Al Cinema', ['/category/in-sala/', 'peliculas', '']),
|
||||
('Novità', ['/category/nuove-uscite/', 'peliculas', '']),
|
||||
@@ -89,7 +87,7 @@ def genres(item):
|
||||
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
findhost()
|
||||
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.args = 'search'
|
||||
@@ -105,7 +103,7 @@ def search(item, text):
|
||||
|
||||
def newest(categoria):
|
||||
support.log('newest ->', categoria)
|
||||
findhost()
|
||||
|
||||
itemlist = []
|
||||
item = Item()
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
from core import support
|
||||
|
||||
__channel__ = "cb01anime"
|
||||
host = support.config.get_channel_url(__channel__) + '/anime'
|
||||
host = support.config.get_channel_url() + '/anime'
|
||||
|
||||
Blacklist = ['AVVISO IMPORTANTE – CB01.ROCKS', 'Lista Alfabetica Completa Anime/Cartoon', 'CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE','Lista Richieste Up & Re-Up']
|
||||
list_servers = ['verystream', 'openload', 'streamango', 'thevideome']
|
||||
|
||||
+12
-20
@@ -10,23 +10,17 @@ from core.item import Item
|
||||
from lib import unshortenit
|
||||
from platformcode import logger, config
|
||||
|
||||
#impostati dinamicamente da findhost()
|
||||
host = "https://cb01.cx"
|
||||
headers = ""
|
||||
|
||||
|
||||
def findhost():
|
||||
pass
|
||||
# global host, headers
|
||||
# permUrl = httptools.downloadpage('https://www.cb01.uno/', follow_redirects=False).headers
|
||||
# if 'google' in permUrl['location']:
|
||||
# if host[:4] != 'http':
|
||||
# host = 'https://'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
# else:
|
||||
# host = permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
# else:
|
||||
# host = permUrl['location']
|
||||
# headers = [['Referer', host]]
|
||||
permUrl = httptools.downloadpage('https://www.cb01.uno/', follow_redirects=False).headers
|
||||
if 'google' in permUrl['location']:
|
||||
host = permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
else:
|
||||
host = permUrl['location']
|
||||
return host
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['verystream', 'openload', 'streamango', 'wstream']
|
||||
list_quality = ['HD', 'SD', 'default']
|
||||
@@ -37,7 +31,6 @@ checklinks_number = config.get_setting('checklinks_number', 'cineblog01')
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
findhost()
|
||||
film = [
|
||||
('HD', ['', 'menu', 'Film HD Streaming']),
|
||||
('Generi', ['', 'menu', 'Film per Genere']),
|
||||
@@ -60,7 +53,6 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
findhost()
|
||||
patronBlock = item.args + r'<span.*?><\/span>.*?<ul.*?>(?P<block>.*?)<\/ul>'
|
||||
patronMenu = r'href="?(?P<url>[^">]+)"?>(?P<title>.*?)<\/a>'
|
||||
action = 'peliculas'
|
||||
@@ -70,7 +62,7 @@ def menu(item):
|
||||
|
||||
# @support.scrape
|
||||
# def newest(categoria):
|
||||
# findhost()
|
||||
#
|
||||
# # debug = True
|
||||
# patron = r'<a href="?(?P<url>[^">]+)"?>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>'
|
||||
|
||||
@@ -100,7 +92,7 @@ def menu(item):
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
findhost()
|
||||
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "series":
|
||||
@@ -175,7 +167,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
findhost()
|
||||
|
||||
|
||||
if item.contentType == "episode":
|
||||
return findvid_serie(item)
|
||||
|
||||
@@ -12,8 +12,7 @@ from platformcode import config
|
||||
list_servers = ['akstream', 'wstream', 'backin', 'clipwatching', 'cloudvideo', 'verystream', 'onlystream', 'mixdrop']
|
||||
list_quality = ['default']
|
||||
|
||||
__channel__ = "cinemalibero"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
|
||||
@@ -10,8 +10,7 @@ from core import httptools, scrapertools, servertools, support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
__channel__ = "documentaristreamingda"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
|
||||
list_servers = ['']
|
||||
list_quality = ['']
|
||||
|
||||
@@ -51,8 +51,7 @@ from core import scrapertoolsV2, httptools, servertools, tmdb
|
||||
from core.item import Item
|
||||
|
||||
##### fine import
|
||||
__channel__ = "dreamsub"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
# server di esempio...
|
||||
|
||||
@@ -35,7 +35,7 @@ list_quality = ['default']
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
findhost()
|
||||
|
||||
|
||||
tvshow = [''
|
||||
]
|
||||
@@ -113,7 +113,7 @@ def pagina(url):
|
||||
# =========== def ricerca =============
|
||||
def search(item, texto):
|
||||
support.log()
|
||||
findhost()
|
||||
|
||||
item.url = "%s/?s=%s" % (host, texto)
|
||||
item.contentType = 'tvshow'
|
||||
|
||||
@@ -131,7 +131,7 @@ def search(item, texto):
|
||||
|
||||
def newest(categoria):
|
||||
support.log()
|
||||
findhost()
|
||||
|
||||
itemlist = []
|
||||
item = Item()
|
||||
item.contentType = 'tvshow'
|
||||
|
||||
@@ -21,8 +21,7 @@ from core.item import Item
|
||||
from core.support import log
|
||||
from platformcode import config
|
||||
|
||||
__channel__ = 'fastsubita'
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
list_servers = ['verystream', 'openload', 'speedvideo', 'wstream', 'flashx', 'vidoza', 'vidtome']
|
||||
list_quality = ['default']
|
||||
|
||||
@@ -17,8 +17,7 @@ from core import servertools, httptools, support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
__channel__ = 'filmigratis'
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
|
||||
list_servers = ['verystream', 'openload', 'streamango', 'vidoza', 'okru']
|
||||
list_quality = ['1080p', '720p', '480p', '360']
|
||||
|
||||
@@ -22,8 +22,7 @@ from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
|
||||
__channel__ = 'filmpertutti'
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
list_servers = ['speedvideo', 'verystream', 'openload', 'streamango', 'wstream', 'akvideo']
|
||||
list_quality = ['HD', 'SD']
|
||||
|
||||
@@ -14,8 +14,7 @@ from platformcode import logger
|
||||
from specials import autoplay
|
||||
|
||||
# Necessario per Autoplay
|
||||
__channel__ = 'filmsenzalimiticc'
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
|
||||
@@ -19,8 +19,7 @@ from core.item import Item
|
||||
from platformcode import config
|
||||
from core.support import log
|
||||
|
||||
__channel__ = 'guardaserieclick'
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['speedvideo', 'openload']
|
||||
|
||||
@@ -38,8 +38,7 @@ from core.support import log
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
__channel__ = 'ilgeniodellostreaming'
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
|
||||
list_servers = ['verystream', 'openload', 'streamango']
|
||||
list_quality = ['default']
|
||||
|
||||
@@ -19,8 +19,7 @@ from core import support, httptools, scrapertoolsV2
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
__channel__ = 'italiaserie'
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['speedvideo']
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
from core import support
|
||||
|
||||
__channel__ = "mondoserietv"
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
|
||||
@@ -7,8 +7,7 @@ from core import support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
__channel__ = "netfreex"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = ""
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
from core import support
|
||||
from core.support import config, log
|
||||
|
||||
__channel__ = "piratestreaming"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
|
||||
list_servers = ['mixdrop', 'speedvideo', 'gounlimited', 'onlystream', 'youtube']
|
||||
list_quality = ['default']
|
||||
|
||||
+1
-2
@@ -9,8 +9,7 @@ from core.item import Item
|
||||
from platformcode import config
|
||||
import json, datetime
|
||||
|
||||
__channel__ = "polpotv"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
|
||||
headers = [['Accept', 'application/ld+json']]
|
||||
|
||||
|
||||
+4
-5
@@ -7,8 +7,7 @@
|
||||
from core import scrapertoolsV2, httptools, support
|
||||
from core.item import Item
|
||||
|
||||
__channel__ = 'seriehd'
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
# host = 'https://www.seriehd.watch'
|
||||
headers = ''
|
||||
@@ -26,7 +25,7 @@ list_quality = ['1080p', '720p', '480p', '360']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
findhost()
|
||||
|
||||
tvshow = [('Genere', ['', 'genre']),
|
||||
('Americane', ['/serie-tv-streaming/serie-tv-americane', 'peliculas']),
|
||||
('Italiane', ['/serie-tv-streaming/serie-tv-italiane', 'peliculas']),]
|
||||
@@ -73,7 +72,7 @@ def genre(item):
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
findhost()
|
||||
|
||||
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + "/?s=" + texto
|
||||
@@ -88,7 +87,7 @@ def search(item, texto):
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
findhost()
|
||||
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
try:
|
||||
|
||||
@@ -39,7 +39,7 @@ list_quality = ['default']
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
findhost()
|
||||
|
||||
|
||||
film = ['/ultimi-film-aggiunti/',
|
||||
('Lista', ['/lista-film/', 'peliculas', 'lista'])
|
||||
@@ -129,7 +129,7 @@ def episodios(item):
|
||||
|
||||
def search(item, text):
|
||||
support.log("CERCA :" ,text, item)
|
||||
findhost()
|
||||
|
||||
item.url = "%s/?s=%s" % (host, text)
|
||||
|
||||
try:
|
||||
@@ -144,7 +144,7 @@ def search(item, text):
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
findhost()
|
||||
|
||||
itemlist = []
|
||||
item = Item()
|
||||
|
||||
|
||||
@@ -12,8 +12,7 @@ from core.item import Item
|
||||
from core.support import log
|
||||
from platformcode import logger, config
|
||||
|
||||
__channel__ = "serietvsubita"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
|
||||
@@ -13,8 +13,7 @@ from core.item import Item
|
||||
from core.support import log
|
||||
from platformcode import config
|
||||
|
||||
__channel__ = 'serietvu'
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['speedvideo']
|
||||
|
||||
@@ -30,7 +30,7 @@ def findhost():
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
findhost()
|
||||
|
||||
film = ["/film/"]
|
||||
anime = ["/genere/anime/"]
|
||||
tvshow = ["/serietv/"]
|
||||
@@ -56,17 +56,17 @@ def generos(item):
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
findhost()
|
||||
|
||||
return support.dooplay_peliculas(item, True if "/genere/" in item.url else False)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
findhost()
|
||||
|
||||
return support.dooplay_get_episodes(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
findhost()
|
||||
|
||||
itemlist = []
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
if link['title'] != 'Guarda il trailer':
|
||||
|
||||
@@ -9,8 +9,7 @@ Nota per i tester: questo non è un canale 'tradizionale', essendo un canale tel
|
||||
la lista delle pagine non sarà affatto 'uniforme' (a seconda di come viene presentata la preview)
|
||||
"""
|
||||
|
||||
__channel__ = "streamtime"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', 'org.telegram.messenger']]
|
||||
list_servers = ['directo']
|
||||
list_quality = ['default']
|
||||
|
||||
@@ -34,7 +34,7 @@ list_quality = ['default']
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
log()
|
||||
findhost()
|
||||
|
||||
|
||||
#top = [(support.typo('Novità Film/Serie/Anime/Altro', 'bold'),['/film/'])]
|
||||
top = [('Novità Film/Serie/Anime/Altro', ['/film/', 'peliculas', 'all'])]
|
||||
@@ -62,7 +62,7 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
log()
|
||||
findhost()
|
||||
|
||||
|
||||
if item.args == 'search':
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="Permalink to\s(?P<title>[^"]+) \((?P<year>[^<]+)\).*?".*?<img[^s]+src="(?P<thumb>[^"]+)".*?<div class="calitate">\s*<p>(?P<quality>[^<]+)<\/p>'
|
||||
@@ -82,7 +82,7 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
log()
|
||||
findhost()
|
||||
|
||||
if not item.data:
|
||||
data_check = httptools.downloadpage(item.url, headers=headers).data
|
||||
data_check = re.sub('\n|\t', ' ', data_check)
|
||||
@@ -125,7 +125,7 @@ def player_or_not(item):
|
||||
|
||||
def category(item):
|
||||
log()
|
||||
findhost()
|
||||
|
||||
blacklist = ['Serie TV Altadefinizione', 'HD AltaDefinizione', 'Al Cinema', 'Serie TV', 'Miniserie', 'Programmi Tv', 'Live', 'Trailers', 'Serie TV Aggiornate', 'Aggiornamenti', 'Featured']
|
||||
itemlist = support.scrape(item, '<li><a href="([^"]+)"><span></span>([^<]+)</a></li>', ['url', 'title'], headers, blacklist, patron_block='<ul class="table-list">(.*?)</ul>', action='peliculas')
|
||||
return support.thumb(itemlist)
|
||||
@@ -163,7 +163,7 @@ def anime(item):
|
||||
|
||||
def search(item, texto):
|
||||
log(texto)
|
||||
findhost()
|
||||
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
@@ -276,7 +276,6 @@ def findvideos(item):
|
||||
url = '\t' + scrapertoolsV2.find_single_match(page,'<meta name="og:url" content="([^=]+)">')
|
||||
if url:
|
||||
listurl.add(url)
|
||||
support.dbg()
|
||||
return support.server(item, data=listurl if listurl else data)#, headers=headers)
|
||||
# return itemlist
|
||||
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
from core import support
|
||||
|
||||
__channel__ = "toonitalia"
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
+1
-2
@@ -8,8 +8,7 @@ from core.item import Item
|
||||
from platformcode import logger, config
|
||||
from specials import autoplay
|
||||
|
||||
__channel__ = "vedohd"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = config.get_channel_url()
|
||||
headers = ""
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
|
||||
+1
-2
@@ -8,8 +8,7 @@ from core.item import Item
|
||||
from specials import autorenumber
|
||||
from lib.concurrent import futures
|
||||
|
||||
__channel__ = "vvvvid"
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
# Creating persistent session
|
||||
current_session = requests.Session()
|
||||
|
||||
+10
-1
@@ -377,7 +377,16 @@ def scrape(func):
|
||||
|
||||
log('PATRON= ', patron)
|
||||
if not data:
|
||||
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True, session=item.session).data.replace("'", '"')
|
||||
page = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True, session=item.session)
|
||||
# if url may be changed and channel has findhost to update
|
||||
if (not page.data or scrapertoolsV2.get_domain_from_url(page.url) != scrapertoolsV2.get_domain_from_url(item.url)) and 'findhost' in func.__globals__:
|
||||
host = func.__globals__['findhost']()
|
||||
from core import jsontools
|
||||
jsontools.update_node(host, func.__module__.split('.')[-1], 'url')
|
||||
item.url = item.url.replace(scrapertoolsV2.get_domain_from_url(item.url), scrapertoolsV2.get_domain_from_url(host))
|
||||
page = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True,
|
||||
session=item.session)
|
||||
data = page.data.replace("'", '"')
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
# replace all ' with " and eliminate newline, so we don't need to worry about
|
||||
|
||||
+18
-10
@@ -90,16 +90,24 @@ def is_xbmc():
|
||||
def get_videolibrary_support():
|
||||
return True
|
||||
|
||||
def get_channel_url(name):
|
||||
try:
|
||||
import json
|
||||
except:
|
||||
import simplejson as json
|
||||
ROOT_DIR = xbmc.translatePath(__settings__.getAddonInfo('Path'))
|
||||
LOCAL_FILE = os.path.join(ROOT_DIR, "channels.json")
|
||||
with open(LOCAL_FILE) as f:
|
||||
data = json.load(f)
|
||||
return data[name]
|
||||
def get_channel_url(findhostMethod=None):
|
||||
from core import jsontools
|
||||
import inspect
|
||||
|
||||
frame = inspect.stack()[1]
|
||||
name = os.path.basename(frame[0].f_code.co_filename).replace('.py', '')
|
||||
if findhostMethod:
|
||||
url = jsontools.get_node_from_file(name, 'url')
|
||||
if not url:
|
||||
url = findhostMethod()
|
||||
jsontools.update_node(url, name, 'url')
|
||||
return url
|
||||
else:
|
||||
ROOT_DIR = xbmc.translatePath(__settings__.getAddonInfo('Path'))
|
||||
LOCAL_FILE = os.path.join(ROOT_DIR, "channels.json")
|
||||
with open(LOCAL_FILE) as f:
|
||||
data = jsontools.load(f.read())
|
||||
return data[name]
|
||||
|
||||
def get_system_platform():
|
||||
""" fonction: pour recuperer la platform que xbmc tourne """
|
||||
|
||||
Reference in New Issue
Block a user