Merge branch 'stable' of github.com:kodiondemand/addon into stable
This commit is contained in:
+13
-47
@@ -62,36 +62,6 @@ def menu(item):
|
||||
return locals()
|
||||
|
||||
|
||||
# @support.scrape
|
||||
# def newest(categoria):
|
||||
#
|
||||
# # 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>'
|
||||
|
||||
# if type(categoria) != Item:
|
||||
# item = Item()
|
||||
# else:
|
||||
# item = categoria
|
||||
# categoria = 'series' if item.contentType != 'movie' else 'movie'
|
||||
# pagination = 20
|
||||
|
||||
# if categoria == 'series':
|
||||
# item.contentType = 'tvshow'
|
||||
# action = 'episodios'
|
||||
# item.url = host + 'serietv/aggiornamento-quotidiano-serie-tv/'
|
||||
# patronBlock = r'<article class="sequex-post-content">(?P<block>.*?)</article>'
|
||||
# patron = '<a href="(?P<url>[^"]+)".*?>(?P<title>[^<([|]+).*?(?P<lang>ITA|SUB-ITA)?</a'
|
||||
# else:
|
||||
# item.contentType = 'movie'
|
||||
# item.url = host + '/lista-film-ultimi-100-film-aggiunti/'
|
||||
# patronBlock = r'Ultimi 100 film aggiunti:(?P<block>.*?)<\/td>'
|
||||
# # else:
|
||||
# # patronBlock = r'Ultimi 100 film Aggiornati:(?P<block>.*?)<\/td>'
|
||||
# # item = categoria
|
||||
|
||||
# return locals()
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
|
||||
@@ -135,7 +105,7 @@ def peliculas(item):
|
||||
'Aggiornamento Quotidiano Serie TV', 'OSCAR 2019 ▶ CB01.UNO: Vota il tuo film preferito! 🎬',
|
||||
'Openload: la situazione. Benvenuto Verystream', 'Openload: lo volete ancora?',
|
||||
'OSCAR 2020 ▶ VOTA IL TUO FILM PREFERITO! 🎬']
|
||||
# debug = True
|
||||
|
||||
if 'newest' in item.args:
|
||||
if '/serietv/' not in item.url:
|
||||
pagination = ''
|
||||
@@ -146,19 +116,16 @@ def peliculas(item):
|
||||
patronBlock = r'Ultime SerieTv aggiornate(?P<block>.*?)Lista'
|
||||
patron = r'src="(?P<thumb>[^"]+)" alt="(?P<title>.*?)(?: – \d+×\d+)?(?:"| – )(?:(?P<lang>Sub-ITA|ITA))?[^>]*>[^>]+>[^>]+><a href="(?P<url>[^"]+)".*?<div class="rpwe-summary">.*?\((?P<year>\d{4})[^\)]*\) (?P<plot>[^<]+)<'
|
||||
action = 'episodios'
|
||||
|
||||
elif '/serietv/' not in item.url:
|
||||
patron = r'<div class="card-image">\s<a[^>]+>\s*<img src="(?P<thumb>[^" ]+)" alt[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[A-Za-z0-9/-]+)])? (?:\((?P<year>[0-9]{4})\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<genre>[^<>&âÂÂ]+)(?:[^ ]+\s*DURATA\s*(?P<duration>[0-9]+)[^>]+>[^>]+>[^>]+>(?P<plot>[^<>]+))?'
|
||||
# patron = r'<div class="?card-image"?>.*?<img src="?(?P<thumb>[^" ]+)"? alt.*?<a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[A-Za-z0-9/-]+)])? (?:\((?P<year>[0-9]{4})\))?.*?<strong>(?P<genre>[^<>&–]+).*?DURATA (?P<duration>[0-9]+).*?<br(?: /)?>(?P<plot>[^<>]+)'
|
||||
action = 'findvideos'
|
||||
|
||||
else:
|
||||
# debug = True
|
||||
patron = r'div class="card-image">.*?<img src="(?P<thumb>[^ ]+)" alt.*?<a href="(?P<url>[^ >]+)">(?P<title>.*?)(?: – (?:[SS]tagione \d|\d).*?)?(?P<lang>(?:[Ss][Uu][Bb]-)?[Ii][Tt][Aa])?<\/a>.*?(?:<strong><span style="[^"]+">(?P<genre>[^<>0-9(]+)\((?P<year>[0-9]{4}).*?</(?:p|div)>(?P<plot>.*?))?</div'
|
||||
patron = r'div class="card-image">.*?<img src="(?P<thumb>[^ ]+)" alt.*?<a href="(?P<url>[^ >]+)">(?P<title>.*?)(?: –\s*(?:[SS]tagione \d|\d).*?)?(?P<lang>(?:[Ss][Uu][Bb]-)?[Ii][Tt][Aa])?<\/a>.*?(?:<strong><span style="[^"]+">(?P<genre>[^<>0-9(]+)\((?P<year>[0-9]{4}).*?</(?:p|div)>(?P<plot>.*?))?</div'
|
||||
action = 'episodios'
|
||||
item.contentType = 'tvshow'
|
||||
|
||||
# patronBlock=[r'<div class="?sequex-page-left"?>(?P<block>.*?)<aside class="?sequex-page-right"?>',
|
||||
# '<div class="?card-image"?>.*?(?=<div class="?card-image"?>|<div class="?rating"?>)']
|
||||
# if 'newest' not in item.args:
|
||||
patronNext = '<a class="?page-link"? href="?([^>]+)"?><i class="fa fa-angle-right">'
|
||||
|
||||
return locals()
|
||||
@@ -167,7 +134,6 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
patronBlock = r'(?P<block><div class="sp-head[a-z ]*?" title="Espandi">\s*(?:STAGION[EI]\s*(?:DA\s*[0-9]+\s*A)?\s*[0-9]+|MINISERIE) - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?[^<>]*?<\/div>.*?)<div class="spdiv">\[riduci\]<\/div>'
|
||||
# patron = '(?:<p>|<strong>)(?P<episode>[0-9]+(?:×|×)[0-9]+)\s*(?P<title2>[^&<]*)?(?:–|-)?\s*(?P<url>.*?)(?:<\/p>|<br)'
|
||||
patron = r'(?:/>|<p>|<strong>)(?P<url>.*?(?P<episode>[0-9]+(?:×|ÃÂ)[0-9]+)\s*(?P<title2>.*?)?(?:\s*–|\s*-|\s*<).*?)(?:<\/p>|<br)'
|
||||
def itemlistHook(itemlist):
|
||||
title_dict = {}
|
||||
@@ -254,15 +220,15 @@ def findvid_serie(item):
|
||||
matches = support.match(html, patron=r'<a href="([^"]+)"[^=]+="_blank"[^>]+>(?!<!--)(.*?)(?:</a>|<img)').matches
|
||||
for url, server in matches:
|
||||
item = Item(channel=item.channel,
|
||||
action="play",
|
||||
title=server,
|
||||
url=url,
|
||||
server=server,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
quality=blktxt,
|
||||
contentType=item.contentType,
|
||||
folder=False)
|
||||
action="play",
|
||||
title=server,
|
||||
url=url,
|
||||
server=server,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
quality=blktxt,
|
||||
contentType=item.contentType,
|
||||
folder=False)
|
||||
if 'swzz' in item.url: item.url = support.swzz_get_url(item)
|
||||
itemlist.append(item)
|
||||
|
||||
|
||||
+12
-11
@@ -12,18 +12,19 @@ from platformcode import config
|
||||
list_servers = ['akstream', 'wstream', 'backin', 'clipwatching', 'cloudvideo', 'verystream', 'onlystream', 'mixdrop']
|
||||
list_quality = ['default']
|
||||
|
||||
def findhost():
|
||||
permUrl = httptools.downloadpage('https://www.cinemalibero.online/', follow_redirects=False).headers
|
||||
try:
|
||||
import urlparse
|
||||
except:
|
||||
import urllib.parse as urlparse
|
||||
p = list(urlparse.urlparse(permUrl['location'].replace('https://www.google.com/search?q=site:', '')))
|
||||
if not p[0]:
|
||||
p[0] = 'https'
|
||||
return urlparse.urlunparse(p)
|
||||
# rimanda a .today che contiene tutti link a .plus
|
||||
# def findhost():
|
||||
# permUrl = httptools.downloadpage('https://www.cinemalibero.online/', follow_redirects=False).headers
|
||||
# try:
|
||||
# import urlparse
|
||||
# except:
|
||||
# import urllib.parse as urlparse
|
||||
# p = list(urlparse.urlparse(permUrl['location'].replace('https://www.google.com/search?q=site:', '')))
|
||||
# if not p[0]:
|
||||
# p[0] = 'https'
|
||||
# return urlparse.urlunparse(p)
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per cinetecadibologna
|
||||
# ------------------------------------------------------------
|
||||
from core.item import Item
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per documentaristreamingda
|
||||
# ------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ from core import scrapertools, httptools, support
|
||||
from core.item import Item
|
||||
|
||||
def findhost():
|
||||
permUrl = httptools.downloadpage('https://eurostreaming.link/', follow_redirects=False).headers
|
||||
permUrl = httptools.downloadpage('https://eurostreaming.link/', follow_redirects=False, only_headers=True).headers
|
||||
host = 'https://'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
return host
|
||||
|
||||
|
||||
@@ -155,9 +155,6 @@ def newest(categoria):
|
||||
def findvideos(item):
|
||||
if item.contentType == 'movie':
|
||||
data = httptools.downloadpage(item.url).data
|
||||
toUnshorten = scrapertools.find_multiple_matches(data, 'https?://buckler.link/[a-zA-Z0-9]+')
|
||||
for link in toUnshorten:
|
||||
data += '\n' + httptools.downloadpage(link, follow_redirects=False).headers["Location"]
|
||||
return support.server(item, data=data)
|
||||
else:
|
||||
return support.server(item, item.url)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "hd4me",
|
||||
"name": "HD4ME",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "hd4me.png",
|
||||
"banner": "hd4me.png",
|
||||
"categories": ["movie", "vos"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per HD4ME
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import httptools, support
|
||||
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['mega']
|
||||
list_quality = ['default']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = [('Genere', ['', 'genre'])]
|
||||
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
patron = r'<a href="(?P<url>[^"]+)" rel="[^"]+" title="(?P<title>[^\(]+)(?!\()\s*\((?P<year>\d+)\)\s\D+(?P<quality>\d+p) ... (?P<lang>[^ ]+).*?<img id="cov" src="(?P<thumb>[^"]+)"'
|
||||
patronNext = r'rel="next" href="([^"]+)"'
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def genre(item):
|
||||
action = 'peliculas'
|
||||
blacklist =['prova ']
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)" class="menu-link\s*sub-menu-link">(?P<title>[^<]+)<'
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
item.url = host + '/?s=' + text
|
||||
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():
|
||||
support.logger.error("search except: %s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
url = support.match(item, patron=r'<a class="bot1" href="([^"]+)"').match
|
||||
url = support.httptools.downloadpage(url, followredirect=True).url
|
||||
return support.server(item, url)
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "metalvideo",
|
||||
"name": "Metal Video",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["*"],
|
||||
"thumbnail": "metalvideo.png",
|
||||
"banner": "metalvideo.png",
|
||||
"categories": ["music"],
|
||||
"not_active":["include_in_global_search"],
|
||||
"settings" :[]
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per altadefinizione01
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from xml.dom import minidom
|
||||
|
||||
#impostati dinamicamente da findhost()
|
||||
|
||||
|
||||
host = 'https://metalvideo.com'
|
||||
headers={'X-Requested-With': 'XMLHttpRequest'}
|
||||
|
||||
list_servers = ['youtube']
|
||||
list_quality = ['default']
|
||||
|
||||
@support.scrape
|
||||
def mainlist(item):
|
||||
item.url = host
|
||||
action = 'peliculas'
|
||||
patronBlock = r'<ul class="dropdown-menu(?P<block>.*?)</ul> </div'
|
||||
patron = r'<a href="(?P<url>[^"]+)"(?: class="")?>(?P<title>[^<]+)<'
|
||||
def itemHook(item):
|
||||
item.thumbnail = support.thumb(thumb='music.png')
|
||||
return item
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.pop(0)
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel=item.channel,
|
||||
title=support.typo('Cerca...', 'bold color kod'),
|
||||
url = item.url,
|
||||
action='search',
|
||||
thumbnail=support.thumb(thumb='search.png')))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
action = 'findvideos'
|
||||
patron= r'<img src="[^"]+" alt="(?P<title>[^"]+)" data-echo="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)"'
|
||||
patronNext = r'<a href="([^"]+)">»'
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
return support.server(item, video_library=False)
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
url = host + '/search.php?keywords=' + text + '&video-id='
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
+30
-16
@@ -2,9 +2,9 @@
|
||||
# ------------------------------------------------------------
|
||||
# KoD - XBMC Plugin
|
||||
# Canale polpotv
|
||||
# ------------------------------------------------------------
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import scrapertools, httptools, support, jsontools
|
||||
from core import support, jsontools
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
import json, datetime
|
||||
@@ -42,15 +42,15 @@ def newest(categoria):
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/api/movies'
|
||||
elif categoria == 'series':
|
||||
item.contentType = 'tvshow'
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host+'/api/shows'
|
||||
return peliculas(item)
|
||||
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for element in json_object['hydra:member']:
|
||||
if 'shows' not in item.url:
|
||||
@@ -70,30 +70,37 @@ def peliculas(item):
|
||||
def episodios(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for season in json_object['seasons']:
|
||||
seas_url=host+season['@id']+'/releases'
|
||||
itemlist_season=get_season(item.channel, seas_url, season['seasonNumber'])
|
||||
itemlist_season=get_season(item, seas_url, season['seasonNumber'])
|
||||
if(len(itemlist_season)>0):
|
||||
itemlist.extend(itemlist_season)
|
||||
|
||||
support.videolibrary(itemlist, item, 'color kod bold')
|
||||
support.download(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
def get_season(channel, seas_url, seasonNumber):
|
||||
def get_season(item, seas_url, seasonNumber):
|
||||
support.log()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(seas_url, headers=headers).data
|
||||
data = support.match(seas_url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for episode in json_object['hydra:member']:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
Item(channel=item.channel,
|
||||
action='findvideos',
|
||||
contentType='episode',
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
contentSerieName=item.contentSerieName,
|
||||
title=str(seasonNumber)+"x"+str("%02d"%episode['episodeNumber']),
|
||||
url=seas_url,
|
||||
thumbnail=item.thumbnail,
|
||||
fanart=item.fanart,
|
||||
plot=item.plot,
|
||||
extra=str(len(json_object['hydra:member'])-episode['episodeNumber'])))
|
||||
return itemlist[::-1]
|
||||
|
||||
@@ -102,17 +109,17 @@ def search(item, texto):
|
||||
itemlist=[]
|
||||
try:
|
||||
item.url = host + "/api/movies?originalTitle="+texto+"&translations.name=" +texto
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for movie in json_object['hydra:member']:
|
||||
item.contentType='movie'
|
||||
itemlist.extend(get_itemlist_element(movie,item))
|
||||
item.url = host + "/api/shows?originalTitle="+texto+"&translations.name=" +texto
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for tvshow in json_object['hydra:member']:
|
||||
item.contentType='tvshow'
|
||||
itemlist.extend(get_itemlist_element(tvshow,item))
|
||||
itemlist.extend(get_itemlist_element(tvshow,item))
|
||||
return itemlist
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
@@ -124,7 +131,7 @@ def search(item, texto):
|
||||
def search_movie_by_genre(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for genre in json_object['hydra:member']:
|
||||
itemlist.append(
|
||||
@@ -155,7 +162,7 @@ def findvideos(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
try:
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
array_index=0
|
||||
if item.contentType!='movie':
|
||||
@@ -165,7 +172,10 @@ def findvideos(item):
|
||||
Item(
|
||||
channel=item.channel,
|
||||
action="play",
|
||||
title='Direct',
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle = item.fulltitle,
|
||||
search = item.search,
|
||||
url=video['src'],
|
||||
server='directo',
|
||||
quality=str(video['size'])+ 'p',
|
||||
@@ -204,7 +214,7 @@ def get_itemlist_element(element,item):
|
||||
next_action='findvideos'
|
||||
quality=support.typo(element['lastQuality'].upper(), '_ [] color kod bold')
|
||||
url="%s%s/releases"
|
||||
infoLabels['tmdbid']=element['tmdbId']
|
||||
infoLabels['tmdb_id']=element['tmdbId']
|
||||
else:
|
||||
next_action='episodios'
|
||||
quality=''
|
||||
@@ -223,4 +233,8 @@ def get_itemlist_element(element,item):
|
||||
url=url %(host,element['@id'] ),
|
||||
infoLabels=infoLabels,
|
||||
extra=item.extra))
|
||||
|
||||
if item.contentType=='movie':
|
||||
for item in itemlist:
|
||||
item= support.tmdb.find_and_set_infoLabels(item)
|
||||
return itemlist
|
||||
|
||||
+10
-10
@@ -44,42 +44,42 @@ def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append(Item(channel=__channel__, action="videos", title="Más Calientes", url=host,
|
||||
viewmode="movie", thumbnail=get_thumb("channels_adult.png")))
|
||||
viewmode="movie", thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Nuevas", url=host + '/newest',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Tendencias", url=host + '/tending',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Mejores Videos", url=host + '/top',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Populares", url=host + '/popular',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Videos en HD", url=host + '/hd',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Caseros", url=host + '/hd',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='homemade',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="PornStar", action="catalogo",
|
||||
url=host + '/pornstars/', viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Categorías", action="categorias",
|
||||
url=host + '/categories/', viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Buscador", action="search", url=host,
|
||||
thumbnail=get_thumb("channels_adult.png"), extra="buscar"))
|
||||
thumbnail=get_thumb("adult.png"), extra="buscar"))
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
+3
-5
@@ -58,7 +58,6 @@ def learning(item):
|
||||
itemlist =[]
|
||||
json = current_session.get(item.url).json()['contents']
|
||||
for key in json:
|
||||
support.log(key['name'])
|
||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(key['name'],'bold'), fulltitle = key['name'], show = key['name'],
|
||||
url = key['contents'], thumbnail = item.thumbnail, action = 'peliculas', args = item.args))
|
||||
return itemlist
|
||||
@@ -117,7 +116,6 @@ def replay(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()[item.fulltitle][0]['palinsesto'][0]['programmi']
|
||||
# support.log(json)
|
||||
for key in json:
|
||||
support.log('KEY=',key)
|
||||
if key and key['pathID']: itemlist.append(support.Item(channel = item.channel, thumbnail = getUrl(key['images']['landscape']), fanart = getUrl(key['images']['landscape']), url = getUrl(key['pathID']),
|
||||
@@ -165,13 +163,13 @@ def dirette(item):
|
||||
onAir = current_session.get(onair).json()['on_air']
|
||||
for i, key in enumerate(json):
|
||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(key['channel'], 'bold'), fulltitle = key['channel'], show = key['channel'],
|
||||
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"), fanart = getUrl(onAir[i]['currentItem']['image']), url = key['video']['contentUrl'],
|
||||
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"),forcethumb=True , fanart = getUrl(onAir[i]['currentItem']['image']), url = key['video']['contentUrl'],
|
||||
plot = support.typo(onAir[i]['currentItem']['name'],'bold')+ '\n\n' + onAir[i]['currentItem']['description'], action = 'play'))
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
support.log(item.url)
|
||||
support.log()
|
||||
itemlist = []
|
||||
keys = []
|
||||
key_list = []
|
||||
@@ -235,7 +233,7 @@ def select(item):
|
||||
|
||||
|
||||
def episodios(item):
|
||||
support.log(len(item.url))
|
||||
support.log()
|
||||
itemlist = []
|
||||
if type(item.url) in [list, dict] and len(item.url) > 1 and ('name' in item.url[0] and 'stagione' not in item.url[0]['name'].lower()):
|
||||
for key in item.url:
|
||||
|
||||
+8
-19
@@ -108,39 +108,28 @@ def newest(categoria):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
log()
|
||||
log(item)
|
||||
if item.args != 'update':
|
||||
data = item.url
|
||||
toUnshorten = scrapertools.find_multiple_matches(data, 'https?://buckler.link/[a-zA-Z0-9]+')
|
||||
for link in toUnshorten:
|
||||
data += '\n' + httptools.downloadpage(link, follow_redirects=False).headers["Location"]
|
||||
return support.server(item, data=data)
|
||||
return support.server(item, data=item.url)
|
||||
else:
|
||||
itemlist = []
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
url_video = scrapertools.find_single_match(data, r'<div class="item"> <a data-id="[^"]+" data-href="([^"]+)" data-original="[^"]+"[^>]+> <div> <div class="title">Episodio \d+', -1)
|
||||
url_serie = scrapertools.find_single_match(data, r'<link rel="canonical" href="([^"]+)"\s?/>')
|
||||
goseries = support.typo(">> Vai alla Serie:", ' bold')
|
||||
series = support.typo(item.contentSerieName, ' bold color kod')
|
||||
data = support.match(item).data
|
||||
urls_video = support.match(data, patron=r'<a data-id="[^"]+" data-(href=".*?)</iframe>').matches[-1]
|
||||
url_serie = support.match(data, patron=r'<link rel="canonical" href="([^"]+)"\s?/>').match
|
||||
|
||||
itemlist = support.server(item, data=url_video)
|
||||
itemlist = support.server(item, data=urls_video)
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title=goseries + series,
|
||||
title=support.typo("Vai alla Serie Completa: " + item.fulltitle, ' bold'),
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
contentType='tvshow',
|
||||
contentSerieName=item.contentSerieName,
|
||||
url=url_serie,
|
||||
action='episodios',
|
||||
contentTitle=item.contentSerieName,
|
||||
plot = goseries + series + "con tutte le puntate",
|
||||
thumbnail = support.thumb(thumb='channels_tvshow.png')
|
||||
thumbnail = support.thumb(thumb='tvshow.png')
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -12,7 +12,7 @@ list_servers = ['verystream', 'openload', 'wstream']
|
||||
list_quality = ['1080p', 'HD', 'DVDRIP', 'SD', 'CAM']
|
||||
|
||||
def findhost():
|
||||
permUrl = httptools.downloadpage('https://www.popcornstream.info', follow_redirects=False).headers
|
||||
permUrl = httptools.downloadpage('https://www.popcornstream.info', follow_redirects=False, only_headers=True).headers
|
||||
if 'google' in permUrl['location']:
|
||||
host = permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
if host[:4] != 'http':
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "tunein",
|
||||
"name": "TuneIn",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["*"],
|
||||
"thumbnail": "tunein.png",
|
||||
"banner": "tunein.png",
|
||||
"categories": ["music"],
|
||||
"not_active":["include_in_global_search"],
|
||||
"settings" :[]
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per altadefinizione01
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from xml.dom import minidom
|
||||
|
||||
#impostati dinamicamente da findhost()
|
||||
|
||||
|
||||
host = 'http://api.radiotime.com'
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.scrape
|
||||
def mainlist(item):
|
||||
item.url = host
|
||||
action = 'radio'
|
||||
patron = r'text="(?P<title>[^"]+)" URL="(?P<url>[^"]+)"'
|
||||
def itemHook(item):
|
||||
item.thumbnail = support.thumb(thumb='music.png')
|
||||
return item
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel=item.channel,
|
||||
title=support.typo('Cerca...', 'bold color kod'),
|
||||
url = item.url,
|
||||
action='search',
|
||||
thumbnail=support.thumb(thumb='search.png')))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
def radio(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
data = support.match(item, patron= r'text="(?P<title>[^\("]+)(?:\((?P<location>[^\)]+)\))?" URL="(?P<url>[^"]+)" bitrate="(?P<quality>[^"]+)" reliability="[^"]+" guide_id="[^"]+" subtext="(?P<song>[^"]+)" genre_id="[^"]+" formats="(?P<type>[^"]+)" (?:playing="[^"]+" )?(?:playing_image="[^"]+" )?(?:show_id="[^"]+" )?(?:item="[^"]+" )?image="(?P<thumb>[^"]+)"')
|
||||
if data.matches:
|
||||
for title, location, url, quality, song, type, thumbnail in data.matches:
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel = item.channel,
|
||||
title = support.typo(title, 'bold') + support.typo(quality + ' kbps','_ [] bold color kod'),
|
||||
thumbnail = thumbnail,
|
||||
url = url,
|
||||
contentType = 'music',
|
||||
plot = support.typo(location, 'bold') + '\n' + song,
|
||||
action = 'findvideos'
|
||||
)
|
||||
)
|
||||
else:
|
||||
matches = support.match(data.data, patron= r'text="(?P<title>[^\("]+)(?:\([^\)]+\))?" URL="(?P<url>[^"]+)" (?:guide_id="[^"]+" )?(?:stream_type="[^"]+" )?topic_duration="(?P<duration>[^"]+)" subtext="(?P<plot>[^"]+)" item="[^"]+" image="(?P<thumb>[^"]+)"').matches
|
||||
if matches:
|
||||
for title, url, duration, plot, thumbnail in matches:
|
||||
infoLabels={}
|
||||
infoLabels['duration'] = duration
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel = item.channel,
|
||||
title = support.typo(title, 'bold'),
|
||||
thumbnail = thumbnail,
|
||||
infolLbels = infoLabels,
|
||||
url = url,
|
||||
contentType = 'music',
|
||||
plot = plot,
|
||||
action = 'findvideos'
|
||||
)
|
||||
)
|
||||
else:
|
||||
matches = support.match(data.data, patron= r'text="(?P<title>[^"]+)" URL="(?P<url>[^"]+)"').matches
|
||||
for title, url in matches:
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel = item.channel,
|
||||
title = support.typo(title, 'bold'),
|
||||
thumbnail = item.thumbnail,
|
||||
url = url,
|
||||
action = 'radio'
|
||||
)
|
||||
)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
import xbmc
|
||||
itemlist = []
|
||||
item.action = 'play'
|
||||
urls = support.match(item.url).data.strip().split()
|
||||
for url in urls:
|
||||
item.url= url
|
||||
item.server = 'directo'
|
||||
itemlist.append(item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
item.url = host + '/Search.ashx?query=' +text
|
||||
try:
|
||||
return radio(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
+10
-6
@@ -152,8 +152,8 @@ def episodios(item):
|
||||
episodes.append(episode['episodes'])
|
||||
for episode in episodes:
|
||||
for key in episode:
|
||||
if 'stagione' in key['title'].encode('utf8').lower():
|
||||
match = support.match(key['title'].encode('utf8'), patron=r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)').match
|
||||
if 'stagione' in encode(key['title']).lower():
|
||||
match = support.match(encode(key['title']), patron=r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)').match
|
||||
title = match[0]+'x'+match[1] + ' - ' + item.fulltitle
|
||||
make_item = True
|
||||
elif int(key['season_id']) == int(season_id):
|
||||
@@ -175,10 +175,14 @@ def episodios(item):
|
||||
url= host + show_id + '/season/' + str(key['season_id']) + '/',
|
||||
action= 'findvideos',
|
||||
video_id= key['video_id'],
|
||||
thumbnail= item.thumbnail,
|
||||
fanart = item.fanart,
|
||||
plot=item.plot,
|
||||
contentType = item.contentType
|
||||
))
|
||||
autorenumber.renumber(itemlist, item, 'bold')
|
||||
if autorenumber.check(item) == True:
|
||||
if autorenumber.check(item) == True \
|
||||
or support.match(itemlist[0].title, patron=r"(\d+x\d+)").match:
|
||||
support.videolibrary(itemlist,item)
|
||||
return itemlist
|
||||
|
||||
@@ -211,10 +215,10 @@ def make_itemlist(itemlist, item, data):
|
||||
search = item.search if item.search else ''
|
||||
infoLabels = {}
|
||||
for key in data['data']:
|
||||
if search.lower() in key['title'].encode('utf8').lower():
|
||||
if search.lower() in encode(key['title']).lower():
|
||||
infoLabels['year'] = key['date_published']
|
||||
infoLabels['title'] = infoLabels['tvshowtitle'] = key['title']
|
||||
title = key['title'].encode('utf8')
|
||||
title = encode(key['title'])
|
||||
itemlist.append(
|
||||
Item(
|
||||
channel = item.channel,
|
||||
@@ -242,4 +246,4 @@ def encode(text):
|
||||
if sys.version_info[0] >= 3:
|
||||
return text
|
||||
else:
|
||||
return text.encode('utf8')
|
||||
return text.encode('utf8')
|
||||
Reference in New Issue
Block a user