KoD 0.7.2
- - aggiunto raiplay - agigunto d.s.d.a (ex documentaristreamingda) - svariati fix ai canali (eurostreaming, streamtime, piratestreaming, altadefinizioneclick) - la videoteca ora può essere messa nelle unità di rete - aggiunto server upstream - altri piccoli fix vari
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<addon id="plugin.video.kod" name="Kodi on Demand" provider-name="KOD Team" version="0.7.1">
|
||||
<addon id="plugin.video.kod" name="Kodi on Demand" provider-name="KOD Team" version="0.7.2">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
<import addon="script.module.libtorrent" optional="true"/>
|
||||
@@ -19,10 +19,12 @@
|
||||
<screenshot>resources/media/themes/ss/2.png</screenshot>
|
||||
<screenshot>resources/media/themes/ss/3.png</screenshot>
|
||||
</assets>
|
||||
<news>- A grande richiesta, è ora possibile riprodurre in automatico l'episodio successivo di una serie in libreria
|
||||
- aggiunta la possibilità di nascondere la lista dei server, quando si usa l'autoplay
|
||||
- aggiunto canale pufimovies.com
|
||||
- fix vari</news>
|
||||
<news>- - aggiunto raiplay
|
||||
- agigunto d.s.d.a (ex documentaristreamingda)
|
||||
- svariati fix ai canali (eurostreaming, streamtime, piratestreaming, altadefinizioneclick)
|
||||
- la videoteca ora può essere messa nelle unità di rete
|
||||
- aggiunto server upstream
|
||||
- altri piccoli fix vari</news>
|
||||
<description lang="it">Naviga velocemente sul web e guarda i contenuti presenti</description>
|
||||
<disclaimer>[COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR]
|
||||
[COLOR yellow]Kodi © is a registered trademark of the XBMC Foundation. We are not connected to or in any other way affiliated with Kodi, Team Kodi, or the XBMC Foundation. Furthermore, any software, addons, or products offered by us will receive no support in official Kodi channels, including the Kodi forums and various social networks.[/COLOR]</disclaimer>
|
||||
|
||||
+4
-2
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"altadefinizione01": "https://www.altadefinizione01.tel",
|
||||
"altadefinizione01_link": "https://altadefinizione01.cam",
|
||||
"altadefinizioneclick": "https://altadefinizione.style",
|
||||
"animeforce": "https://ww1.animeforce.org",
|
||||
"animeleggendari": "https://animepertutti.com",
|
||||
"animesaturn": "https://animesaturn.com",
|
||||
@@ -13,8 +14,8 @@
|
||||
"casacinemaInfo": "https://casacinema.kim",
|
||||
"cb01anime": "https://www.cineblog01.ink",
|
||||
"cinetecadibologna": "http://cinestore.cinetecadibologna.it",
|
||||
"documentaristreamingda": "https://documentari-streaming-da.com",
|
||||
"dreamsub": "https://dreamsub.stream",
|
||||
"dsda": "https://www.dsda.press/",
|
||||
"fastsubita": "https://fastsubita.com",
|
||||
"filmgratis": "https://www.filmaltadefinizione.org",
|
||||
"filmigratis": "https://filmigratis.org",
|
||||
@@ -24,13 +25,14 @@
|
||||
"guardarefilm": "https://www.guardarefilm.red",
|
||||
"guardaserie_stream": "https://guardaserie.store",
|
||||
"guardaserieclick": "https://www.guardaserie.media",
|
||||
"ilgeniodellostreaming": "https://igds.se",
|
||||
"ilgeniodellostreaming": "https://ilgeniodellostreaming.si",
|
||||
"italiaserie": "https://italiaserie.org",
|
||||
"mondoserietv": "https://mondoserietv.com",
|
||||
"netfreex": "https://www.netfreex.pro",
|
||||
"piratestreaming": "https://www.piratestreaming.gratis",
|
||||
"polpotv": "https://polpo.tv",
|
||||
"pufimovies": "https://pufimovies.com",
|
||||
"raiplay": "https://www.raiplay.it",
|
||||
"seriehd": "https://www.seriehd.watch",
|
||||
"serietvonline": "https://serietvonline.icu",
|
||||
"serietvsubita": "http://serietvsubita.xyz",
|
||||
|
||||
@@ -21,12 +21,12 @@ from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
def findhost():
|
||||
data = support.httptools.downloadpage('https://altadefinizione-nuovo.link/').data
|
||||
host = support.scrapertools.find_single_match(data, '<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
return host
|
||||
# def findhost():
|
||||
# data = support.httptools.downloadpage('https://altadefinizione-nuovo.link/').data
|
||||
# host = support.scrapertools.find_single_match(data, '<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
# return host
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
list_servers = ['mixdrop', 'vidcloud', 'vidoza', 'supervideo', 'hdload', 'mystream']
|
||||
list_quality = ['1080p', '720p', '360p']
|
||||
|
||||
+16
-6
@@ -35,6 +35,7 @@ def mainlist(item):
|
||||
('HD', ['', 'menu', 'Film HD Streaming']),
|
||||
('Generi', ['', 'menu', 'Film per Genere']),
|
||||
('Anni', ['', 'menu', 'Film per Anno']),
|
||||
('Paese', ['', 'menu', 'Film per Paese']),
|
||||
('Ultimi Aggiornati',['/lista-film-ultimi-100-film-aggiornati/', 'peliculas', 'newest']),
|
||||
('Ultimi Aggiunti', ['/lista-film-ultimi-100-film-aggiunti/', 'peliculas', 'newest'])
|
||||
]
|
||||
@@ -144,7 +145,8 @@ def peliculas(item):
|
||||
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"?>.*?<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>[^<>]+)'
|
||||
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})\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?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
|
||||
@@ -161,8 +163,8 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
patronBlock = r'(?P<block><div class="sp-head[a-z ]*?" title="Espandi">\s*(?:STAGIONE [0-9]+|MINISERIE) - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?[^<>]*?</div>.*?)<div class="spdiv">\[riduci\]</div>'
|
||||
patron = '(?:<p>|<strong>)(?P<episode>[0-9]+(?:×|×)[0-9]+)(?P<url>.*?)(?:</p>|<br)'
|
||||
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)'
|
||||
|
||||
return locals()
|
||||
|
||||
@@ -208,7 +210,7 @@ def findvideos(item):
|
||||
matches = re.compile(patronvideos, re.DOTALL).finditer(data)
|
||||
QualityStr = ""
|
||||
for match in matches:
|
||||
QualityStr = scrapertools.decodeHtmlentities(match.group(1))[6:]
|
||||
QualityStr = scrapertools.decodeHtmlentities(match.group(1))
|
||||
|
||||
# Estrae i contenuti - Streaming
|
||||
load_links(itemlist, '<strong>Streamin?g:</strong>(.*?)cbtable', "orange", "Streaming", "SD")
|
||||
@@ -218,8 +220,16 @@ def findvideos(item):
|
||||
|
||||
# Estrae i contenuti - Streaming 3D
|
||||
load_links(itemlist, '<strong>Streamin?g 3D[^<]+</strong>(.*?)cbtable', "pink", "Streaming 3D")
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
itemlist=support.server(item, itemlist=itemlist)
|
||||
if itemlist and QualityStr:
|
||||
itemlist.insert(0,
|
||||
Item(channel=item.channel,
|
||||
action="",
|
||||
title="[COLOR orange]%s[/COLOR]" % QualityStr,
|
||||
folder=False))
|
||||
|
||||
return itemlist
|
||||
|
||||
# Estrae i contenuti - Download
|
||||
# load_links(itemlist, '<strong>Download:</strong>(.*?)<tableclass=cbtable height=30>', "aqua", "Download")
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"id": "documentaristreamingda",
|
||||
"name": "DocumentariStreamingDa",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "documentaristreamingda.png",
|
||||
"banner": "documentaristreamingda.png",
|
||||
"categories": ["documentary"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi ricerca globale",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_documentales",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Documentari",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,264 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per documentaristreamingda
|
||||
# ------------------------------------------------------------
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
from core import httptools, scrapertools, servertools, support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
host = config.get_channel_url()
|
||||
|
||||
list_servers = ['']
|
||||
list_quality = ['']
|
||||
|
||||
def mainlist(item):
|
||||
logger.info("kod.documentaristreamingda mainlist")
|
||||
itemlist = [Item(channel=item.channel,
|
||||
title="[COLOR azure]Aggiornamenti[/COLOR]",
|
||||
action="peliculas",
|
||||
url=host + "/?searchtype=movie&post_type=movie&sl=lasts&s=",
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Categorie[/COLOR]",
|
||||
action="categorias",
|
||||
url=host + "/documentari-streaming-dataarchive/",
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR yellow]Cerca...[/COLOR]",
|
||||
action="search",
|
||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")]
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info("kod.documentaristreamingda newest" + categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "documentales":
|
||||
item.url = host + "/?searchtype=movie&post_type=movie&sl=lasts&s="
|
||||
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
|
||||
|
||||
|
||||
def categorias(item):
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
bloque = scrapertools.find_single_match(data, 'Categorie</a></li>(.*?)</ul>')
|
||||
|
||||
# Estrae i contenuti
|
||||
patron = '<a href="([^"]+)">([^<]+)</a></li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(bloque)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.replace("Documentari ", ""))
|
||||
|
||||
html = httptools.downloadpage(scrapedurl).data
|
||||
|
||||
patron = '>Ultime uscite[^<]+<\/h3><a href="([^"]+)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(html)
|
||||
for url in matches:
|
||||
url = url.replace("&", "&")
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="peliculas",
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=url,
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png",
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("kod.documentaristreamingda " + item.url + " search " + texto)
|
||||
item.url = host + "/?searchtype=movie&post_type=movie&s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
logger.info("kod.documentaristreamingda peliculas")
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
# Estrae i contenuti
|
||||
patron = '<div class="movie-poster">\s*<img[^s]+src="([^"]+)"[^=]+=[^=]+="([^"]+)"[^>]+>[^<]+<a[^h]+href="([^"]+)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedthumbnail, scrapedtitle, scrapedurl in matches:
|
||||
# html = httptools.downloadpage(scrapedurl)
|
||||
# start = html.find("</div><h2>")
|
||||
# end = html.find("<p><strong>", start)
|
||||
# scrapedplot = html[start:end]
|
||||
# scrapedplot = re.sub(r'<[^>]*>', '', scrapedplot)
|
||||
# scrapedplot = scrapertools.decodeHtmlentities(scrapedplot)
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapedtitle.replace("streaming", "")
|
||||
scrapedtitle = scrapedtitle.replace("_", " ")
|
||||
scrapedtitle = scrapedtitle.replace("-", " ")
|
||||
scrapedtitle = scrapedtitle.title()
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
viewmode="movie_with_plot",
|
||||
thumbnail=scrapedthumbnail,
|
||||
plot=scrapedplot,
|
||||
folder=True))
|
||||
|
||||
# Paginazione
|
||||
patronvideos = '<a class="next page-numbers" href="(.*?)">'
|
||||
matches = re.compile(patronvideos, re.DOTALL).findall(data)
|
||||
|
||||
if len(matches) > 0:
|
||||
scrapedurl = urlparse.urljoin(item.url, matches[0])
|
||||
scrapedurl = scrapedurl.replace("&", "&")
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="peliculas",
|
||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png",
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("kod.documentaristreamingda findvideos")
|
||||
return support.server(item)#, data= item.url)
|
||||
|
||||
##
|
||||
## data = httptools.downloadpage(item.url).data
|
||||
##
|
||||
## links = []
|
||||
## begin = data.find('<div class="moview-details-text">')
|
||||
## if begin != -1:
|
||||
## end = data.find('<!-- //movie-details -->', begin)
|
||||
## mdiv = data[begin:end]
|
||||
##
|
||||
## items = [[m.end(), m.group(1)] for m in re.finditer('<b style="color:#333333;">(.*?)<\/b>', mdiv)]
|
||||
## if items:
|
||||
## for idx, val in enumerate(items):
|
||||
## if idx == len(items) - 1:
|
||||
## _data = mdiv[val[0]:-1]
|
||||
## else:
|
||||
## _data = mdiv[val[0]:items[idx + 1][0]]
|
||||
##
|
||||
## for link in re.findall('<a.*?href="([^"]+)"[^>]+>.*?<b>(.*?)<\/b><\/a>+', _data):
|
||||
## if not link[0].strip() in [l[1] for l in links]: links.append(
|
||||
## [val[1], link[0].strip(), link[1].strip()])
|
||||
##
|
||||
## items = [[m.end(), m.group(1)] for m in re.finditer('<p><strong>(.*?)<\/strong><\/p>', mdiv)]
|
||||
## if items:
|
||||
## _title = ''
|
||||
## for idx, val in enumerate(items):
|
||||
## if idx == len(items) - 1:
|
||||
## _data = mdiv[val[0]:-1]
|
||||
## else:
|
||||
## _data = mdiv[val[0]:items[idx + 1][0]]
|
||||
##
|
||||
## for link in re.findall('<a\s.*?href="([^"]+)".*?>(?:<span[^>]+>)*(?:<strong>)*([^<]+)', _data):
|
||||
## if not link[0].strip() in [l[1] for l in links]:
|
||||
## if not link[1].strip() in link[0]: _title = link[1].strip()
|
||||
## links.append([_title, link[0].strip(), 'unknown'])
|
||||
##
|
||||
## items = [[m.start(), m.group(1)] for m in re.finditer('<li><strong>([^<]+)<', mdiv)]
|
||||
## if items:
|
||||
## for idx, val in enumerate(items):
|
||||
## if idx == len(items) - 1:
|
||||
## _data = mdiv[val[0]:-1]
|
||||
## else:
|
||||
## _data = mdiv[val[0]:items[idx + 1][0]]
|
||||
##
|
||||
## for link in re.findall('<a\s.*?href="([^"]+)".*?>(?:<span[^>]+>)*(?:<strong>)*([^<]+)', _data):
|
||||
## if not link[0].strip() in [l[1] for l in links]: links.append(
|
||||
## [val[1], link[0].strip(), link[1].strip()])
|
||||
##
|
||||
## itemlist = []
|
||||
## if links:
|
||||
## for l in links:
|
||||
## title = unicode(l[0], 'utf8', 'ignore')
|
||||
## title = title.replace(u'\xa0', ' ').replace('Documentario ', '').replace(' doc ', ' ').replace(' streaming',
|
||||
## '').replace(
|
||||
## ' Streaming', '')
|
||||
## url = l[1]
|
||||
## action = "play"
|
||||
## server = "unknown"
|
||||
## folder = False
|
||||
##
|
||||
## if url == '#' or not title: continue
|
||||
##
|
||||
## logger.info('server: %s' % l[2])
|
||||
## if l[2] != 'unknown':
|
||||
## server = unicode(l[2], 'utf8', 'ignore')
|
||||
## else:
|
||||
## logger.info(url)
|
||||
## match = re.search('https?:\/\/(?:www\.)*([^\.]+)\.', url)
|
||||
## if match:
|
||||
## server = match.group(1)
|
||||
##
|
||||
## if server == "documentari-streaming-db":
|
||||
## action = "findvideos"
|
||||
## folder = True
|
||||
## logger.info('server: %s, action: %s' % (server, action))
|
||||
##
|
||||
## logger.info(title + ' - [COLOR blue]' + server + '[/COLOR]')
|
||||
##
|
||||
## itemlist.append(Item(
|
||||
## channel=item.channel,
|
||||
## title=title + ' - [COLOR blue]' + server + '[/COLOR]',
|
||||
## action=action,
|
||||
## server=server, # servertools.get_server_from_url(url),
|
||||
## url=url,
|
||||
## thumbnail=item.thumbnail,
|
||||
## fulltitle=title,
|
||||
## show=item.show,
|
||||
## plot=item.plot,
|
||||
## parentContent=item,
|
||||
## folder=folder)
|
||||
## )
|
||||
## else:
|
||||
## itemlist = servertools.find_video_items(data=data)
|
||||
##
|
||||
## for videoitem in itemlist:
|
||||
## videoitem.title = "".join([item.title, '[COLOR green][B]' + videoitem.title + '[/B][/COLOR]'])
|
||||
## videoitem.fulltitle = item.fulltitle
|
||||
## videoitem.show = item.show
|
||||
## videoitem.thumbnail = item.thumbnail
|
||||
## videoitem.channel = item.channel
|
||||
##
|
||||
## return itemlist
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "dsda",
|
||||
"name": "D.S.D.A",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "dsda.png",
|
||||
"banner": "dsda.png",
|
||||
"categories": ["documentary"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per documentaristreamingda
|
||||
# ------------------------------------------------------------
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
from core import httptools, scrapertools, servertools, support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
host = config.get_channel_url()
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
docu = [('Documentari {bullet bold}',('/elenco-documentari','peliculas')),
|
||||
('Categorie {submenu}',('','menu')),
|
||||
('Cerca... {bullet bold}',('','search')),]
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
patronMenu = r'<li class="menu-item menu-item-type-taxonomy[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)<'
|
||||
def fullItemlistHook(itemlist):
|
||||
item_list = []
|
||||
title_list = []
|
||||
for item in itemlist:
|
||||
if item.title not in title_list:
|
||||
item_list.append(item)
|
||||
title_list.append(item.title)
|
||||
itemlist = item_list
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
def newest(categoria):
|
||||
support.log()
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "documentales":
|
||||
item.url = host + "/elenco-documentari"
|
||||
item.action = "peliculas"
|
||||
return peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
if item.args == 'collection':
|
||||
patron = r'<div class="cover-racolta">\s*<a href="(?P<url>[^"]+)"[^>]+>\s*<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>(?P<title>[^<]+)<'
|
||||
elif item.args == 'raccolta':
|
||||
patron = r'<a (?:style="[^"]+" )?href="(?P<url>[^"]+)"[^>]+>(?:[^>]+><strong>)?(?P<title>[^<]+)(?:</a>)?</strong'
|
||||
else:
|
||||
patron = r'<article[^>]+>[^>]+>[^>]+>(?:<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>)?.*?<a href="(?P<url>[^"]+)">\s*(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<p>(?P<plot>[^<]+)<'
|
||||
patronNext = r'<a class="page-numbers next" href="([^"]+)">'
|
||||
|
||||
# select category
|
||||
def itemHook(item):
|
||||
title = support.re.sub(r'(?:[Ss]erie\s*|[Ss]treaming(?:\s*[Dd][Aa])?\s*|[Cc]ollezione\s*|[Rr]accolta\s*|[Dd]ocumentari(?:o)?\s*)?','',item.fulltitle).strip()
|
||||
if 'serie' in item.fulltitle.lower():
|
||||
item.contentType = 'tvshow'
|
||||
item.action = 'episodios'
|
||||
item.contentSerieName = title
|
||||
item.contentTitle = ''
|
||||
elif 'collezione' in item.fulltitle.lower():
|
||||
item.args = 'collection'
|
||||
item.action = 'peliculas'
|
||||
item.contentTitle = title
|
||||
item.contentSerieName = ''
|
||||
elif 'raccolta' in item.fulltitle.lower():
|
||||
item.args = 'raccolta'
|
||||
item.action = 'peliculas'
|
||||
item.contentTitle = title
|
||||
item.contentSerieName = ''
|
||||
else:
|
||||
item.contentTitle = title
|
||||
item.contentSerieName = ''
|
||||
|
||||
item.title = support.typo(title,'bold')
|
||||
item.fulltitle = item.show = title
|
||||
return item
|
||||
# remove duplicates
|
||||
def fullItemlistHook(itemlist):
|
||||
item_list = []
|
||||
title_list = []
|
||||
for item in itemlist:
|
||||
if item.title not in title_list:
|
||||
item_list.append(item)
|
||||
title_list.append(item.title)
|
||||
itemlist = item_list
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
patron = r'class="title-episodio">(?P<episode>[^<]+)<(?P<url>.*?)<p'
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
if item.args == 'raccolta' or item.contentType == 'episode':
|
||||
return support.server(item, item.url)
|
||||
else:
|
||||
return support.server(item)
|
||||
@@ -25,7 +25,7 @@ headers = [['Referer', host]]
|
||||
|
||||
|
||||
|
||||
list_servers = ['verystream', 'wstream', 'speedvideo', 'flashx', 'nowvideo', 'streamango', 'deltabit', 'openload']
|
||||
list_servers = ['akstream', 'wstream', 'mixdrop', 'vidtome', 'turbovid', 'speedvideo', 'flashx', 'nowvideo', 'deltabit']
|
||||
list_quality = ['default']
|
||||
|
||||
@support.menu
|
||||
|
||||
@@ -23,7 +23,7 @@ from platformcode import config
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
list_servers = ['verystream', 'openload', 'speedvideo', 'wstream', 'flashx', 'vidoza', 'vidtome']
|
||||
list_servers = ['wstream', 'upstream', 'flashx', 'vidoza', 'vidtome']
|
||||
list_quality = ['default']
|
||||
|
||||
|
||||
|
||||
@@ -4,32 +4,6 @@
|
||||
# Canale per ilgeniodellostreaming
|
||||
# ------------------------------------------------------------
|
||||
|
||||
"""
|
||||
|
||||
Alcuni video non si aprono sul sito...
|
||||
|
||||
Avvisi per il test:
|
||||
i link per le categorie non sono TUTTI visibili nella pagina del sito:
|
||||
vanno costruiti con i nomi dei generi che vedete nel CANALE.
|
||||
Es:
|
||||
https://ilgeniodellostreaming.se/genere/+ genere nel canale
|
||||
genere-> kids
|
||||
https://ilgeniodellostreaming.se/genere/kids
|
||||
genere-> avventura
|
||||
https://ilgeniodellostreaming.se/genere/avventura
|
||||
Se il genere è formato da 2 parola lo spazio si trasforma in -
|
||||
genere-> televisione film
|
||||
https://ilgeniodellostreaming.se/genere/televisione-film
|
||||
|
||||
Novità -> Serietv e Aggiornamenti nel canale:
|
||||
- le pagine sono di 25 titoli
|
||||
|
||||
|
||||
##### note per i dev #########
|
||||
- La pagina "Aggiornamenti Anime" del sito è vuota (update 13-9-2019)
|
||||
- in url: film o serietv
|
||||
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
@@ -68,7 +42,7 @@ def mainlist(item):
|
||||
]
|
||||
|
||||
Tvshow = [
|
||||
('Show TV', ['/tv-show/', 'peliculas', '', 'tvshow'])
|
||||
('Show TV bullet bold', ['/tv-show/', 'peliculas', '', 'tvshow'])
|
||||
]
|
||||
|
||||
search = ''
|
||||
@@ -81,21 +55,11 @@ def peliculas(item):
|
||||
log()
|
||||
|
||||
if item.args == 'search':
|
||||
|
||||
patronBlock = r'<div class="search-page">(?P<block>.*?)<footer class="main">'
|
||||
patron = r'<div class="thumbnail animation-2"><a href="(?P<url>[^"]+)">'\
|
||||
'<img src="(?P<thumb>[^"]+)" alt="[^"]+" \/>[^>]+>(?P<type>[^<]+)'\
|
||||
'<\/span>.*?<a href.*?>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?'\
|
||||
'<\/a>[^>]+>(?:<span class="rating">IMDb\s*(?P<rating>[0-9.]+)<\/span>)?'\
|
||||
'.+?(?:<span class="year">(?P<year>[0-9]+)<\/span>)?[^>]+>[^>]+><p>(?P<plot>.*?)<\/p>'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)" alt="[^"]+" />[^>]+>(?P<type>[^<]+)</span>.*?<a href="(?P<url>[^"]+)">(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?</a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*(?P<rating>[^>]+)</span>)?.?(?:<span class="year">(?P<year>[0-9]+)</span>)?[^>]+>[^>]+><p>(?P<plot>.*?)</p>'
|
||||
|
||||
## type_content_dict={'movie': ['film'], 'tvshow': ['tv']}
|
||||
## type_action_dict={'findvideos': ['film'], 'episodios': ['tv']}
|
||||
def itemHook(item):
|
||||
if 'film' not in item.url:
|
||||
item.contentType = 'tvshow'
|
||||
item.action = 'episodios'
|
||||
return item
|
||||
typeContentDict={'movie': ['film'], 'tvshow': ['tv']}
|
||||
typeActionDict={'findvideos': ['film'], 'episodios': ['tv']}
|
||||
else:
|
||||
|
||||
if item.contentType == 'movie':
|
||||
@@ -161,9 +125,8 @@ def genres(item):
|
||||
elif item.args == 'letter':
|
||||
patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">'
|
||||
|
||||
patron = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>'
|
||||
patronMenu = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>'
|
||||
|
||||
## debug = True
|
||||
return locals()
|
||||
|
||||
def search(item, text):
|
||||
@@ -211,34 +174,4 @@ def newest(categoria):
|
||||
|
||||
def findvideos(item):
|
||||
log()
|
||||
itemlist =[]
|
||||
|
||||
html = support.match(item, patron='<iframe class="metaframe rptss" src="([^"]+)"[^>]+>',headers=headers)
|
||||
matches = html.matches
|
||||
data = html.data
|
||||
for url in matches:
|
||||
html = httptools.downloadpage(url, headers=headers).data
|
||||
data += str(scrapertools.find_multiple_matches(html, '<meta name="og:url" content="([^"]+)">'))
|
||||
|
||||
itemlist = support.server(item, data)
|
||||
|
||||
if item.args == 'update':
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = r'<div class="item"><a href="'+host+'/serietv/([^"\/]+)\/"><i class="icon-bars">'
|
||||
series = support.match(data, patron=patron).matches
|
||||
titles = support.typo(series.upper().replace('-', ' '), 'bold color kod')
|
||||
goseries = support.typo("Vai alla Serie:", ' bold')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title=goseries + titles,
|
||||
fulltitle=titles,
|
||||
show=series,
|
||||
contentType='tvshow',
|
||||
contentSerieName=series,
|
||||
url=host+"/serietv/"+series,
|
||||
action='episodios',
|
||||
contentTitle=titles,
|
||||
plot = "Vai alla Serie :" + titles + " con tutte le puntate",
|
||||
))
|
||||
return itemlist
|
||||
return support.server(item)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "raiplay",
|
||||
"name": "Rai Play",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "raiplay.png",
|
||||
"banner": "raiplay.png",
|
||||
"categories": ["movie", "tvshow", "documentary", "live"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"settings": [],
|
||||
"cloudflare": true
|
||||
}
|
||||
@@ -0,0 +1,301 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per SerieHD
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import requests
|
||||
from core import support
|
||||
from lib.concurrent import futures
|
||||
current_session = requests.Session()
|
||||
host = support.config.get_channel_url()
|
||||
onair = host + '/palinsesto/onAir.json'
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
top = [('Dirette {bold}', ['/dl/RaiPlay/2016/PublishingBlock-9a2ff311-fcf0-4539-8f8f-c4fee2a71d58.html?json', 'dirette']),
|
||||
('Replay {bold}', ['/dl/RaiPlay/2016/PublishingBlock-9a2ff311-fcf0-4539-8f8f-c4fee2a71d58.html?json', 'replay_menu'])]
|
||||
|
||||
menu = [('Film {bullet bold}', ['/film/index.json', 'menu']),
|
||||
('Serie TV {bullet bold}', ['/serietv/index.json', 'menu']),
|
||||
('Fiction {bullet bold}', ['/fiction/index.json', 'menu']),
|
||||
('Documentari {bullet bold}', ['/documentari/index.json', 'menu']),
|
||||
('Programmi TV{bullet bold}', ['/programmi/index.json', 'menu']),
|
||||
('Programmi per Bambini {bullet bold}', ['/bambini/index.json', 'menu']),
|
||||
('Teche Rai {bullet bold storia}', ['/techerai/index.json', 'menu']),
|
||||
('Musica e Teatro {bullet bold}', ['/performing-arts/index.json', 'menu'])
|
||||
]
|
||||
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def menu(item):
|
||||
support.log()
|
||||
itemlist = [support.Item(channel= item.channel, title = support.typo('Tutti','bullet bold'),
|
||||
url = item.url, action = 'peliculas'),
|
||||
|
||||
support.Item(channel= item.channel, title = support.typo('Generi','submenu'),
|
||||
url = item.url, args = 'genre', action = 'submenu'),
|
||||
|
||||
support.Item(channel= item.channel, title = support.typo('A-Z','submenu'),
|
||||
url = item.url, args = 'az', action = 'submenu')]
|
||||
|
||||
return support.thumb(itemlist)
|
||||
|
||||
|
||||
def submenu(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()['contents'][-1]['contents']
|
||||
if item.args == 'az':
|
||||
json_url = getUrl(json[-1]['path_id'])
|
||||
json = current_session.get(json_url).json()['contents']
|
||||
for key in json:
|
||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(key,'bold'), fulltitle = key, show = key,
|
||||
url = json[key], thumbnail = item.thumbnail, action = 'peliculas', args = item.args))
|
||||
else:
|
||||
for key in json:
|
||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(key['name'],'bold'), fulltitle = key['name'], show = key['name'],
|
||||
thumbnail = getUrl(key['image']), url = getUrl(key['path_id']), action = 'peliculas', args = item.args))
|
||||
itemlist.pop(-1)
|
||||
return support.thumb(itemlist)
|
||||
|
||||
|
||||
def replay_menu(item):
|
||||
support.log()
|
||||
import datetime, xbmc
|
||||
|
||||
# create day and month list
|
||||
days = []
|
||||
months = []
|
||||
days.append(xbmc.getLocalizedString(17))
|
||||
for day in range(11, 17): days.append(xbmc.getLocalizedString(day))
|
||||
for month in range(21, 33): months.append(xbmc.getLocalizedString(month))
|
||||
|
||||
# make menu
|
||||
itemlist = []
|
||||
today = datetime.date.today()
|
||||
for d in range(7):
|
||||
day = today - datetime.timedelta(days=d)
|
||||
itemlist.append(support.Item(channel = item.channel, thumbnail = item.thumbnail, action = 'replay_channels', url = item.url, date = day.strftime("%d-%m-%Y"),
|
||||
title = support.typo(days[int(day.strftime("%w"))] + " " + day.strftime("%d") + " " + months[int(day.strftime("%m"))-1], 'bold')))
|
||||
return itemlist
|
||||
|
||||
|
||||
def replay_channels(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()['dirette']
|
||||
for key in json:
|
||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(key['channel'], 'bold'), fulltitle = key['channel'], show = key['channel'],plot = item.title, action = 'replay',
|
||||
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"), url = '%s/palinsesto/app/old/%s/%s.json' % (host, key['channel'].lower().replace(' ','-'), item.date)))
|
||||
return itemlist
|
||||
|
||||
|
||||
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']),
|
||||
title = support.typo(key['timePublished'], 'color kod bold') + support.typo(' | ' + key['name'], ' bold'), fulltitle = key['name'], show = key['name'], plot = key['testoBreve'], action = 'findvideos'))
|
||||
return itemlist
|
||||
|
||||
def search(item, text):
|
||||
support.log()
|
||||
itemlist =[]
|
||||
try:
|
||||
json = current_session.get(host + '/dl/RaiTV/RaiPlayMobile/Prod/Config/programmiAZ-elenco.json').json()
|
||||
for key in json:
|
||||
for key in json[key]:
|
||||
if key.has_key('PathID') and (text.lower() in key['name'].lower()):
|
||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(key['name'],'bold'), fulltitle = key['name'], show = key['name'], url = key['PathID'].replace('/?json', '.json'), action = 'Type',
|
||||
thumbnail = getUrl(key['images']['portrait'] if key['images'].has_key('portrait') else key['images']['portrait43'] if key['images'].has_key('portrait43') else key['images']['landscape']),
|
||||
fanart = getUrl(key['images']['landscape'] if key['images'].has_key('landscape') else key['images']['landscape43'])))
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
return itemlist
|
||||
|
||||
|
||||
def Type(item):
|
||||
json = current_session.get(item.url).json()
|
||||
if json['program_info']['layout'] == 'single':
|
||||
item.contentTitle = item.fulltitle
|
||||
item.contentType = 'movie'
|
||||
return findvideos(item)
|
||||
else:
|
||||
item.contentType = 'tvshow'
|
||||
return select(item)
|
||||
|
||||
|
||||
def dirette(item):
|
||||
support.log()
|
||||
itemlist =[]
|
||||
json = current_session.get(item.url).json()['dirette']
|
||||
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'],
|
||||
plot = support.typo(onAir[i]['currentItem']['name'],'bold')+ '\n\n' + onAir[i]['currentItem']['description'], action = 'play'))
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
keys = []
|
||||
key_list = []
|
||||
|
||||
# pagination options
|
||||
pag = item.page if item.page else 1
|
||||
pagination = 40
|
||||
|
||||
# load json
|
||||
if item.args == 'az':
|
||||
json = item.url
|
||||
for key in json:
|
||||
if item.search.lower() in key['name'].lower():
|
||||
keys.append(key)
|
||||
else:
|
||||
json = current_session.get(item.url).json()
|
||||
|
||||
# load json for main menu item
|
||||
if not item.args:
|
||||
json_url = getUrl(json['contents'][-1]['contents'][-1]['path_id'])
|
||||
json = current_session.get(json_url).json()['contents']
|
||||
else:
|
||||
json = json['contents']
|
||||
for key in json:
|
||||
if len(json[key]) > 0:
|
||||
for key in json[key]:
|
||||
keys.append(key)
|
||||
|
||||
# load titles
|
||||
for i, key in enumerate(keys):
|
||||
if pagination and (pag - 1) * pagination > i: continue # pagination
|
||||
if pagination and i >= pag * pagination: break
|
||||
key_list.append(key)
|
||||
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
itlist = [executor.submit(addinfo, key, item) for key in key_list]
|
||||
for res in futures.as_completed(itlist):
|
||||
if res.result():
|
||||
itemlist.append(res.result())
|
||||
itemlist = sorted(itemlist, key=lambda it: it.title)
|
||||
|
||||
if len(keys) > pag * pagination and not item.search:
|
||||
itemlist.append(support.Item(channel=item.channel, action = item.action, contentType=item.contentType,
|
||||
title=support.typo(support.config.get_localized_string(30992), 'color kod bold'),
|
||||
fulltitle= item.fulltitle, show= item.show, url=item.url, args=item.args, page=pag + 1,
|
||||
thumbnail=support.thumb()))
|
||||
return itemlist
|
||||
|
||||
|
||||
def select(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()['blocks']
|
||||
for key in json:
|
||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(key['name'],'bold'), fulltitle = item.fulltitle,
|
||||
show = item.show, thumbnail = item.thumbnail, url = key['sets'], action = 'episodios', args = item.args))
|
||||
if len(itemlist) == 1:
|
||||
return episodios(itemlist[0])
|
||||
else:
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
itlist = [executor.submit(load_episodes, key, item) for key in item.url]
|
||||
for res in futures.as_completed(itlist):
|
||||
if res.result():
|
||||
itemlist += res.result()
|
||||
if itemlist[0].VL:
|
||||
itemlist.reverse()
|
||||
else:
|
||||
itemlist = sorted(itemlist, key=lambda it: it.title)
|
||||
if itemlist[0].VL: support.videolibrary(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
if item.url.endswith('json'):
|
||||
json = current_session.get(item.url).json()
|
||||
|
||||
if json.has_key('first_item_path'):
|
||||
url = current_session.get(getUrl(json['first_item_path'])).json()['video']['content_url']
|
||||
else:
|
||||
url = json['video']['content_url']
|
||||
else:
|
||||
url = item.url
|
||||
|
||||
itemlist.append(support.Item(channel = item.channel, server = 'directo', title = 'Diretto', fulltitle = item.fulltitle,
|
||||
show = item.show, thumbnail = item.thumbnail, fanart = item.json, url = getUrl(url), action = 'play' ))
|
||||
return support.server(item, itemlist=itemlist, down_load=False)
|
||||
|
||||
|
||||
def getUrl(pathId):
|
||||
support.log()
|
||||
url = pathId.replace(" ", "%20")
|
||||
if url.startswith("/raiplay/"):
|
||||
url = url.replace("/raiplay/",host +'/')
|
||||
|
||||
if url.startswith("//"):
|
||||
url = "https:" + url
|
||||
elif url.startswith("/"):
|
||||
url = host + url
|
||||
|
||||
# fix format of url for json
|
||||
if url.endswith(".html?json"):
|
||||
url = url.replace(".html?json", ".json")
|
||||
elif url.endswith("/?json"):
|
||||
url = url.replace("/?json","/index.json")
|
||||
elif url.endswith("?json"):
|
||||
url = url.replace("?json",".json")
|
||||
|
||||
return url
|
||||
|
||||
|
||||
def addinfo(key, item):
|
||||
support.log()
|
||||
info = current_session.get(getUrl(key['info_url'])).json()
|
||||
it = support.Item( channel = item.channel, title = support.typo(key['name'],'bold'), fulltitle = key['name'], show = key['name'],
|
||||
thumbnail = getUrl(key['images']['portrait_logo']), fanart = getUrl(key['images']['landscape']), url = getUrl(key['path_id']), plot = info['description'])
|
||||
if key['layout'] == 'single':
|
||||
it.action = 'findvideos'
|
||||
it.contentType = 'movie'
|
||||
it.contentTitle = it.fulltitle
|
||||
else:
|
||||
it.action = 'select'
|
||||
it.contentType = 'tvshow'
|
||||
it.contentSerieName = it.fulltitle
|
||||
return it
|
||||
|
||||
|
||||
def load_episodes(key, item):
|
||||
support.log()
|
||||
itemlist=[]
|
||||
json = current_session.get(getUrl(key['path_id'])).json()['items']
|
||||
for key in json:
|
||||
ep = support.match(key['subtitle'].encode('utf8'), patron=r'St\s*(\d+)\s*Ep\s*(\d+)').match
|
||||
if ep:
|
||||
title = ep[0] + 'x' + ep[1].zfill(2) + support.re.sub(r'St\s*\d+\s*Ep\s*\d+','',key['subtitle'].encode('utf8'))
|
||||
else:
|
||||
title = key['subtitle']
|
||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(title, 'bold'), fulltitle = item.fulltitle, show = item.show, thumbnail = item.thumbnail,
|
||||
fanart = getUrl(key['images']['landscape']), url = key['video_url'], plot = key['description'], contentType = 'episode',
|
||||
action = 'findvideos', VL=True if ep else False))
|
||||
return itemlist
|
||||
|
||||
|
||||
+8
-5
@@ -80,7 +80,7 @@ def getchanneltypes(view="thumb_"):
|
||||
logger.info()
|
||||
|
||||
# Lista de categorias
|
||||
channel_types = ["movie", "tvshow", "anime", "documentary", "vos", "direct"] # , "torrent"
|
||||
channel_types = ["movie", "tvshow", "anime", "documentary", "vos", "direct", "live"] # , "torrent"
|
||||
|
||||
if config.get_setting("adult_mode") != 0:
|
||||
channel_types.append("adult")
|
||||
@@ -357,7 +357,7 @@ def thumb(itemlist=[], genre=False, thumb=''):
|
||||
import re
|
||||
|
||||
icon_dict = {'channels_movie':['film'],
|
||||
'channels_tvshow':['serie','tv','episodi','episodio'],
|
||||
'channels_tvshow':['serie','tv','episodi','episodio','fiction'],
|
||||
'channels_documentary':['documentari','documentario', 'documentary'],
|
||||
'channels_all':['tutti'],
|
||||
'news':['novità', "novita'", 'aggiornamenti', 'nuovi', 'nuove'],
|
||||
@@ -385,12 +385,15 @@ def thumb(itemlist=[], genre=False, thumb=''):
|
||||
'popular' : ['popolari','popolare', 'più visti'],
|
||||
'thriller':['thriller'],
|
||||
'top_rated' : ['fortunato', 'votati'],
|
||||
'on_the_air' : ['corso', 'onda'],
|
||||
'on_the_air' : ['corso', 'onda', 'diretta', 'dirette'],
|
||||
'channels_western':['western'],
|
||||
'channels_vos':['sub','sub-ita'],
|
||||
'channels_romance':['romantico','sentimentale', 'romance'],
|
||||
'channels_family':['famiglia','famiglie', 'family'],
|
||||
'channels_historical':['storico', 'history'],
|
||||
'channels_historical':['storico', 'history', 'storia'],
|
||||
'channels_az':['lettera','lista','alfabetico','a-z'],
|
||||
'channels_year':['anno', 'anni'],
|
||||
'update':['replay', 'update'],
|
||||
'autoplay':[config.get_localized_string(60071)]
|
||||
}
|
||||
|
||||
@@ -403,7 +406,7 @@ def thumb(itemlist=[], genre=False, thumb=''):
|
||||
search = ['cerca']
|
||||
|
||||
search_suffix ={'_movie':['film'],
|
||||
'_tvshow':['serie','tv']}
|
||||
'_tvshow':['serie','tv', 'fiction']}
|
||||
|
||||
for item in itemlist:
|
||||
|
||||
|
||||
+2
-1
@@ -253,7 +253,8 @@ def downloadpage(url, **opt):
|
||||
load_cookies()
|
||||
domain = urlparse.urlparse(url).netloc
|
||||
CF = False
|
||||
if domain in ['www.guardaserie.media', 'casacinema.space', 'wstream.video', 'akvideo.stream', 'backin.net', 'dreamsub.stream', 'altadefinizione-nuovo.link']:
|
||||
if domain in ['www.guardaserie.media', 'casacinema.space', 'wstream.video', 'akvideo.stream', 'backin.net',
|
||||
'dreamsub.stream', 'altadefinizione-nuovo.link', 'ilgeniodellostreaming.si', 'www.piratestreaming.gratis']:
|
||||
from lib import cloudscraper
|
||||
session = cloudscraper.create_scraper()
|
||||
CF = True
|
||||
|
||||
+3
-2
@@ -14,7 +14,8 @@ from core import jsontools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from platformcode import platformtools
|
||||
from servers.decrypters import zcrypt
|
||||
# from servers.decrypters import zcrypt
|
||||
from lib import unshortenit
|
||||
|
||||
dict_servers_parameters = {}
|
||||
|
||||
@@ -40,7 +41,7 @@ def find_video_items(item=None, data=None):
|
||||
if data is None:
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
data = zcrypt.get_video_url(data)
|
||||
data = unshortenit.findlinks(data)
|
||||
|
||||
# Crea un item si no hay item
|
||||
if item is None:
|
||||
|
||||
+8
-8
@@ -295,7 +295,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
||||
quality=quality,
|
||||
url=scraped["url"],
|
||||
infoLabels=infolabels,
|
||||
thumbnail=item.thumbnail if function == 'episodios' and not scraped["thumb"] else scraped["thumb"] ,
|
||||
thumbnail=item.thumbnail if function == 'episodios' and not scraped["thumb"] else scraped["thumb"] if scraped["thumb"] else '',
|
||||
args=item.args,
|
||||
contentSerieName= scraped['title'] if item.contentType or CT != 'movie' and function != 'episodios' else item.fulltitle if function == 'episodios' else '',
|
||||
contentTitle= scraped['title'] if item.contentType or CT == 'movie' else '',
|
||||
@@ -420,9 +420,6 @@ def scrape(func):
|
||||
if 'itemlistHook' in args:
|
||||
itemlist = args['itemlistHook'](itemlist)
|
||||
|
||||
if 'fullItemlistHook' in args:
|
||||
itemlist = args['fullItemlistHook'](itemlist)
|
||||
|
||||
if (pagination and len(matches) <= pag * pagination) or not pagination: # next page with pagination
|
||||
if patronNext and inspect.stack()[1][3] != 'newest':
|
||||
nextPage(itemlist, item, data, patronNext, function)
|
||||
@@ -461,7 +458,8 @@ def scrape(func):
|
||||
if 'patronMenu' in args and itemlist:
|
||||
itemlist = thumb(itemlist, genre=True)
|
||||
|
||||
|
||||
if 'fullItemlistHook' in args:
|
||||
itemlist = args['fullItemlistHook'](itemlist)
|
||||
|
||||
# itemlist = filterLang(item, itemlist) # causa problemi a newest
|
||||
|
||||
@@ -1017,9 +1015,11 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
||||
videoitem.server = findS[2]
|
||||
videoitem.title = findS[0]
|
||||
videoitem.url = findS[1]
|
||||
item.title = item.contentTitle.strip() if item.contentType == 'movie' or (
|
||||
config.get_localized_string(30161) in item.title) else item.title
|
||||
videoitem.title = item.title + (typo(videoitem.title, '_ color kod []') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")
|
||||
|
||||
item.title = typo(item.contentTitle.strip(),'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title
|
||||
|
||||
videoitem.plot= typo(videoitem.title, 'bold')
|
||||
videoitem.title = item.title + (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.show = item.show
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
|
||||
+3
-3
@@ -183,7 +183,7 @@ def cache_response(fn):
|
||||
# logger.debug("TARDADO %s" % elapsed_time)
|
||||
|
||||
# error al obtener los datos
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
message = "An exception of type %s occured. Arguments:\n%s" % (type(ex).__name__, repr(ex.args))
|
||||
logger.error("error in: %s" % message)
|
||||
|
||||
@@ -217,7 +217,7 @@ def set_infoLabels(source, seekTmdb=True, idioma_busqueda=def_lang, forced=False
|
||||
logger.debug("The data of %i links were obtained in %f seconds" % (len(source), time.time() - start_time))
|
||||
else:
|
||||
ret = set_infoLabels_item(source, seekTmdb, idioma_busqueda)
|
||||
logger.debug("The data of %i links were obtained in %f seconds" % (time.time() - start_time))
|
||||
logger.debug("The data were obtained in %f seconds" % (time.time() - start_time))
|
||||
return ret
|
||||
|
||||
|
||||
@@ -878,7 +878,7 @@ class Tmdb(object):
|
||||
# logger.debug("result_data es %s" % dict_data)
|
||||
|
||||
# error al obtener los datos
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
message = "An exception of type %s occured. Arguments:\n%s" % (type(ex).__name__, repr(ex.args))
|
||||
logger.error("error in: %s" % message)
|
||||
dict_data = {}
|
||||
|
||||
@@ -225,6 +225,8 @@ def save_movie(item):
|
||||
|
||||
def filter_list(episodelist, action=None, path=None):
|
||||
if path: path = path.decode('utf8')
|
||||
# import xbmc
|
||||
# if xbmc.getCondVisibility('system.platform.windows') > 0: path = path.replace('smb:','').replace('/','\\')
|
||||
channel_prefs = {}
|
||||
lang_sel = quality_sel = show_title = channel =''
|
||||
if action:
|
||||
@@ -234,10 +236,10 @@ def filter_list(episodelist, action=None, path=None):
|
||||
show_title = tvshow_item.infoLabels['tvshowtitle']
|
||||
if not tvshow_item.channel_prefs:
|
||||
tvshow_item.channel_prefs={channel:{}}
|
||||
list_item = os.listdir(path)
|
||||
list_item = filetools.listdir(path)
|
||||
for File in list_item:
|
||||
if (File.endswith('.strm') or File.endswith('.json') or File.endswith('.nfo')):
|
||||
os.remove(os.path.join(path, File))
|
||||
filetools.remove(filetools.join(path, File))
|
||||
if channel not in tvshow_item.channel_prefs:
|
||||
tvshow_item.channel_prefs[channel] = {}
|
||||
channel_prefs = tvshow_item.channel_prefs[channel]
|
||||
|
||||
+58
-6
@@ -26,7 +26,7 @@ def find_in_text(regex, text, flags=re.IGNORECASE | re.DOTALL):
|
||||
|
||||
|
||||
class UnshortenIt(object):
|
||||
_adfly_regex = r'adf\.ly|j\.gs|q\.gs|u\.bb|ay\.gy|atominik\.com|tinyium\.com|microify\.com|threadsphere\.bid|clearload\.bid|activetect\.net|swiftviz\.net|briskgram\.net|activetect\.net|baymaleti\.net|thouth\.net|uclaut\.net|gloyah\.net|larati\.net'
|
||||
_adfly_regex = r'adf\.ly|j\.gs|q\.gs|u\.bb|ay\.gy|atominik\.com|tinyium\.com|microify\.com|threadsphere\.bid|clearload\.bid|activetect\.net|swiftviz\.net|briskgram\.net|activetect\.net|baymaleti\.net|thouth\.net|uclaut\.net|gloyah\.net|larati\.net|scuseami\.net'
|
||||
_linkbucks_regex = r'linkbucks\.com|any\.gs|cash4links\.co|cash4files\.co|dyo\.gs|filesonthe\.net|goneviral\.com|megaline\.co|miniurls\.co|qqc\.co|seriousdeals\.net|theseblogs\.com|theseforums\.com|tinylinks\.co|tubeviral\.com|ultrafiles\.net|urlbeat\.net|whackyvidz\.com|yyv\.co'
|
||||
_adfocus_regex = r'adfoc\.us'
|
||||
_lnxlu_regex = r'lnx\.lu'
|
||||
@@ -36,9 +36,12 @@ class UnshortenIt(object):
|
||||
_shrink_service_regex = r'shrink-service\.it'
|
||||
_rapidcrypt_regex = r'rapidcrypt\.net'
|
||||
_cryptmango_regex = r'cryptmango|xshield\.net'
|
||||
_vcrypt_regex = r'vcrypt\.net'
|
||||
_vcrypt_regex = r'vcrypt\.net|vcrypt\.pw'
|
||||
_linkup_regex = r'linkup\.pro|buckler.link'
|
||||
|
||||
listRegex = [_adfly_regex, _linkbucks_regex, _adfocus_regex, _lnxlu_regex, _shst_regex, _hrefli_regex, _anonymz_regex,
|
||||
_shrink_service_regex, _rapidcrypt_regex, _cryptmango_regex, _vcrypt_regex, _linkup_regex]
|
||||
|
||||
_maxretries = 5
|
||||
|
||||
_this_dir, _this_filename = os.path.split(__file__)
|
||||
@@ -473,14 +476,16 @@ class UnshortenIt(object):
|
||||
|
||||
def _unshorten_vcrypt(self, uri):
|
||||
try:
|
||||
if 'myfoldersakstream.php' in uri or '/verys/' in uri:
|
||||
return uri, 0
|
||||
r = None
|
||||
import base64, pyaes
|
||||
import pyaes
|
||||
|
||||
def decrypt(str):
|
||||
str = str.replace("_ppl_", "+").replace("_eqq_", "=").replace("_sll_", "/")
|
||||
iv = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||
key = "naphajU2usWUswec"
|
||||
decoded = base64.b64decode(str)
|
||||
decoded = b64decode(str)
|
||||
decoded = decoded + '\0' * (len(decoded) % 16)
|
||||
crypt_object = pyaes.AESModeOfOperationCBC(key, iv)
|
||||
decrypted = ''
|
||||
@@ -521,8 +526,31 @@ class UnshortenIt(object):
|
||||
|
||||
def _unshorten_linkup(self, uri):
|
||||
try:
|
||||
r = httptools.downloadpage(uri, follow_redirect=True, timeout=self._timeout, cookies=False)
|
||||
return r.url, r.code
|
||||
r = None
|
||||
if '/tv/' in uri:
|
||||
uri = uri.replace('/tv/', '/tva/')
|
||||
elif 'delta' in uri:
|
||||
uri = uri.replace('/delta/', '/adelta/')
|
||||
elif '/ga/' in uri:
|
||||
uri = b64decode(uri.split('/')[-1]).strip()
|
||||
elif '/speedx/' in uri:
|
||||
uri = uri.replace('http://linkup.pro/speedx', 'http://speedvideo.net')
|
||||
else:
|
||||
r = httptools.downloadpage(uri, follow_redirect=True, timeout=self._timeout, cookies=False)
|
||||
uri = r.url
|
||||
link = re.findall("<iframe[^<>]*src=\\'([^'>]*)\\'[^<>]*>", r.data)
|
||||
# fix by greko inizio
|
||||
if not link:
|
||||
link = re.findall('action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">', r.data)
|
||||
if link:
|
||||
uri = link
|
||||
short = re.findall('^https?://.*?(https?://.*)', uri)
|
||||
if short:
|
||||
uri = short[0]
|
||||
if not r:
|
||||
r = httptools.downloadpage(uri, follow_redirect=True, timeout=self._timeout, cookies=False)
|
||||
uri = r.url
|
||||
return uri, r.code
|
||||
|
||||
except Exception as e:
|
||||
return uri, str(e)
|
||||
@@ -546,3 +574,27 @@ def unshorten(uri, type=None, timeout=10):
|
||||
if status == 200:
|
||||
uri, status = unshortener.unwrap_30x(uri, timeout=timeout)
|
||||
return uri, status
|
||||
|
||||
|
||||
def findlinks(text):
|
||||
unshortener = UnshortenIt()
|
||||
matches = []
|
||||
|
||||
for regex in unshortener.listRegex:
|
||||
regex = '(?:https?://(?:[\w\d]+\.)?)?(?:' + regex + ')/[a-zA-Z0-9_=/]+'
|
||||
for match in re.findall(regex, text):
|
||||
matches.append(match)
|
||||
if len(matches) == 1:
|
||||
text += '\n' + unshorten(matches[0])[0]
|
||||
elif matches:
|
||||
# non threaded for webpdb
|
||||
# for match in matches:
|
||||
# sh = unshorten(match)[0]
|
||||
# text += '\n' + sh
|
||||
from concurrent import futures
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
unshList = [executor.submit(unshorten, match) for match in matches]
|
||||
for link in futures.as_completed(unshList):
|
||||
if link.result()[0] not in matches:
|
||||
text += '\n' + link.result()[0]
|
||||
return text
|
||||
@@ -50,7 +50,7 @@
|
||||
<!-- <setting id="downloadpath" type="folder" label="30017" default=""/>
|
||||
<setting id="downloadlistpath" type="folder" label="30018" default=""/> -->
|
||||
<setting label="30501" type="lsep"/>
|
||||
<setting id="videolibrarypath" type="folder" label="30067" default=""/>
|
||||
<setting id="videolibrarypath" type="folder" label="30067" default="special://profile/addon_data/plugin.video.kod/videolibrary"/>
|
||||
<setting id="folder_tvshows" type="text" label="70118" default="SERIES"/>
|
||||
<setting id="folder_movies" type="text" label="70119" default="CINE"/>
|
||||
<setting label="59997" type="lsep"/>
|
||||
@@ -60,15 +60,15 @@
|
||||
<setting id="videolibrary_max_quality" type="bool" label="70729" default="false" visible="true"/>
|
||||
<setting id="next_ep" type="enum" label="70746" lvalues="70752|70747|70748" default="0"/>
|
||||
<setting id="next_ep_type" type="bool" label="70754" default="false" visible="eq(-1,2)"/>
|
||||
<setting id="next_ep_seconds" type="enum" values="20|30|40|50|60" label="70749" default="2" visible="!eq(-2,0)"/>
|
||||
<setting id="next_ep_seconds" type="enum" values="20|30|40|50|60|70|80|90|100|110|120" label="70749" default="2" visible="!eq(-2,0)"/>
|
||||
</category>
|
||||
|
||||
|
||||
<!-- Downloads -->
|
||||
<category label="30153">
|
||||
<setting id="downloadenabled" type="bool" label="70689" default="false"/>
|
||||
<setting id="downloadpath" type="folder" label="30017" visible="eq(-1,true)" default=""/>
|
||||
<setting id="downloadlistpath" type="folder" label="30018" visible="eq(-2,true)" default=""/>
|
||||
<setting id="downloadpath" type="folder" label="30017" visible="eq(-1,true)" default="special://profile/addon_data/plugin.video.kod/downloads"/>
|
||||
<setting id="downloadlistpath" type="folder" label="30018" visible="eq(-2,true)" default="special://profile/addon_data/plugin.video.kod/downloads/list"/>
|
||||
</category>
|
||||
|
||||
<!-- Visual -->
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<itemgap>0</itemgap>
|
||||
<align>right</align>
|
||||
<control type="button" id="11">
|
||||
<label>$ADDON[plugin.video.kod 70750] $INFO[Player.TimeRemaining(ss),,] $ADDON[plugin.video.kod 70751]</label>
|
||||
<label>$ADDON[plugin.video.kod 70750] $INFO[Player.TimeRemaining(mm:ss)]</label>
|
||||
<onclick>SendClick(3012)</onclick>
|
||||
<height>40</height>
|
||||
<width min="50">auto</width>
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
<itemgap>0</itemgap>
|
||||
<align>right</align>
|
||||
<control type="button" id="11">
|
||||
<label>[B]$INFO[Player.TimeRemaining(ss),,][/B]</label>
|
||||
<label>[B]$INFO[Player.TimeRemaining(mm:ss)][/B]</label>
|
||||
<onclick>SendClick(3012)</onclick>
|
||||
<!-- <visible>!Integer.IsGreater(Player.TimeRemaining,59)</visible> -->
|
||||
<height>40</height>
|
||||
<width>65</width>
|
||||
<width>100</width>
|
||||
<font>font30_title</font>
|
||||
<textoffsetx>12</textoffsetx>
|
||||
<textcolor>80FFFFFF</textcolor>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -1,113 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Ringraziamo errmax e dr-z3r0
|
||||
import re
|
||||
|
||||
from core import httptools, scrapertools
|
||||
from platformcode import logger
|
||||
from servers.decrypters import expurl
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
|
||||
encontrados = {
|
||||
'https://vcrypt.net/images/logo', 'https://vcrypt.net/css/out',
|
||||
'https://vcrypt.net/images/favicon', 'https://vcrypt.net/css/open',
|
||||
'http://linkup.pro/js/jquery', 'https://linkup.pro/js/jquery'#,
|
||||
#'http://www.rapidcrypt.net/open'
|
||||
}
|
||||
devuelve = []
|
||||
|
||||
patronvideos = [
|
||||
r'(https?://(gestyy|rapidteria|sprysphere)\.com/[a-zA-Z0-9]+)',
|
||||
r'(https?://(?:www\.)?(vcrypt|linkup)\.[^/]+/[^/]+/[a-zA-Z0-9_]+)',
|
||||
r'(https?://(?:www\.)?(bit|buckler)\.[^/]+/[a-zA-Z0-9]+)',
|
||||
r'(https?://(?:www\.)?(xshield)\.[^/]+/[^/]+/[^/]+/[a-zA-Z0-9_\.]+)'
|
||||
]
|
||||
|
||||
for patron in patronvideos:
|
||||
# from core.support import dbg; dbg()
|
||||
logger.info(" find_videos #" + patron + "#")
|
||||
matches = re.compile(patron).findall(page_url)
|
||||
|
||||
for url, host in matches:
|
||||
if url not in encontrados:
|
||||
logger.info(" url=" + url)
|
||||
encontrados.add(url)
|
||||
|
||||
if host == 'gestyy':
|
||||
resp = httptools.downloadpage(
|
||||
url,
|
||||
follow_redirects=False,
|
||||
cookies=False,
|
||||
only_headers=True,
|
||||
replace_headers=True,
|
||||
headers={'User-Agent': 'curl/7.59.0'})
|
||||
data = resp.headers.get("location", "")
|
||||
elif 'xshield' in url:
|
||||
from lib import unshortenit
|
||||
data, status = unshortenit.unshorten(url)
|
||||
logger.info("Data - Status zcrypt xshield.net: [%s] [%s] " %(data, status))
|
||||
elif 'vcrypt.net' in url:
|
||||
if 'myfoldersakstream.php' in url or '/verys/' in url:
|
||||
continue
|
||||
else:
|
||||
from lib import unshortenit
|
||||
sh = unshortenit.UnshortenIt()
|
||||
data, status = sh.unshorten(url)
|
||||
logger.info("Data - Status zcrypt vcrypt.net: [%s] [%s] " %(data, status))
|
||||
elif 'linkup' in url or 'bit.ly' in url or 'buckler' in url:
|
||||
logger.info("DATA LINK {}".format(url))
|
||||
if '/tv/' in url:
|
||||
url = url.replace('/tv/','/tva/')
|
||||
elif 'delta' in url:
|
||||
url = url.replace('/delta/','/adelta/')
|
||||
if '/olink/' in url: continue
|
||||
else:
|
||||
idata = httptools.downloadpage(url).data
|
||||
data = scrapertools.find_single_match(idata, "<iframe[^<>]*src=\\'([^'>]*)\\'[^<>]*>")
|
||||
#fix by greko inizio
|
||||
if not data:
|
||||
data = scrapertools.find_single_match(idata, 'action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">')
|
||||
from lib import unshortenit
|
||||
data, status = unshortenit.unshorten(url)
|
||||
# logger.info("Data - Status zcrypt linkup : [%s] [%s] " %(data, status))
|
||||
data = httptools.downloadpage(data, follow_redirect=True).url
|
||||
if '/speedx/' in data: # aggiunto per server speedvideo
|
||||
data = data.replace('http://linkup.pro/speedx', 'http://speedvideo.net')
|
||||
# fix by greko fine
|
||||
else:
|
||||
data = ""
|
||||
while host in url:
|
||||
resp = httptools.downloadpage(
|
||||
url, follow_redirects=False)
|
||||
url = resp.headers.get("location", "")
|
||||
if not url:
|
||||
data = resp.data
|
||||
elif host not in url:
|
||||
data = url
|
||||
if data:
|
||||
devuelve.append(data)
|
||||
else:
|
||||
logger.info(" url duplicada=" + url)
|
||||
|
||||
patron = r"""(https?://(?:www\.)?(?:threadsphere\.bid|adf\.ly|q\.gs|j\.gs|u\.bb|ay\.gy|linkbucks\.com|any\.gs|cash4links\.co|cash4files\.co|dyo\.gs|filesonthe\.net|goneviral\.com|megaline\.co|miniurls\.co|qqc\.co|seriousdeals\.net|theseblogs\.com|theseforums\.com|tinylinks\.co|tubeviral\.com|ultrafiles\.net|urlbeat\.net|whackyvidz\.com|yyv\.co|adfoc\.us|lnx\.lu|sh\.st|href\.li|anonymz\.com|shrink-service\.it|rapidcrypt\.net|ecleneue\.com)/[^"']+)"""
|
||||
|
||||
logger.info(" find_videos #" + patron + "#")
|
||||
matches = re.compile(patron).findall(page_url)
|
||||
|
||||
for url in matches:
|
||||
if url not in encontrados:
|
||||
if 'https://rapidcrypt.net/open/' in url or 'https://rapidcrypt.net/verys/' in url:
|
||||
continue
|
||||
logger.info(" url=" + url)
|
||||
encontrados.add(url)
|
||||
|
||||
long_url = expurl.expand_url(url)
|
||||
if long_url:
|
||||
devuelve.append(long_url)
|
||||
else:
|
||||
logger.info(" url duplicada=" + url)
|
||||
|
||||
ret = page_url+" "+str(devuelve) if devuelve else page_url
|
||||
logger.info(" RET=" + str(ret))
|
||||
return ret
|
||||
@@ -38,5 +38,5 @@
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://mixdrop.co/imgs/mixdrop-logo2.png"
|
||||
"thumbnail": "mixdrop.png"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "upstream.to/([a-z0-9]+)",
|
||||
"url": "https://upstream.to/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "upstream",
|
||||
"name": "UP Stream",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "upstream.png"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------
|
||||
# Conector UP Stream By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
global data
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "<h2>WE ARE SORRY</h2>" in data or '<title>404 Not Found</title>' in data:
|
||||
return False, config.get_localized_string(70449) % "UP Stream"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
video_urls = []
|
||||
media_url = scrapertools.find_single_match(data, r'file:"([^"]+)"')
|
||||
video_urls.append(["%s [UP Stream]" % media_url.split('.'[-1]), media_url])
|
||||
|
||||
return video_urls
|
||||
+9
-4
@@ -21,10 +21,15 @@ def test_video_exists(page_url):
|
||||
page_url = 'https://wstream.video/video.php?file_code=' + code
|
||||
data = httptools.downloadpage(page_url, headers=headers, follow_redirects=True).data
|
||||
|
||||
ID, code = scrapertools.find_single_match(data, r"""input\D*id=(?:'|")([^'"]+)(?:'|").*?value='([a-z0-9]+)""")
|
||||
post = urllib.urlencode({ID: code})
|
||||
|
||||
data = httptools.downloadpage(page_url, headers=headers, post=post, follow_redirects=True).data
|
||||
a = scrapertools.find_single_match(data, r"""input\D*id=(?:'|")([^'"]+)(?:'|").*?value='([a-z0-9]+)""")
|
||||
if a:
|
||||
ID, code = a
|
||||
post = urllib.urlencode({ID: code})
|
||||
data = httptools.downloadpage(page_url, headers=headers, post=post, follow_redirects=True).data
|
||||
else:
|
||||
page_url = scrapertools.find_single_match(data, r"""<center><a href='(https?:\/\/wstream[^']+)'\s*title='bkg'""")
|
||||
if page_url:
|
||||
data = httptools.downloadpage(page_url, headers=headers, follow_redirects=True).data
|
||||
|
||||
if "Not Found" in data or "File was deleted" in data:
|
||||
return False, config.get_localized_string(70449) % 'Wstream'
|
||||
|
||||
@@ -302,7 +302,7 @@ def move_to_libray(item):
|
||||
|
||||
logger.info('ITEM = ' + str(item))
|
||||
name = item.contentTitle if item.contentType == 'movie' else str(item.infoLabels['season']) + 'x' + str(item.infoLabels['episode']).zfill(2)
|
||||
list_item = os.listdir(filetools.join(config.get_videolibrary_path(), FOLDER, path_title))
|
||||
list_item = filetools.listdir(filetools.join(config.get_videolibrary_path(), FOLDER, path_title))
|
||||
|
||||
clean = False
|
||||
for File in list_item:
|
||||
@@ -310,8 +310,8 @@ def move_to_libray(item):
|
||||
name = name.lower()
|
||||
if filename.startswith(name) and (filename.endswith('.strm') or filename.endswith('.json') or filename.endswith('.nfo')):
|
||||
clean = True
|
||||
logger.info('Delete File: ' + str(os.path.join(config.get_videolibrary_path(), FOLDER, path_title, File)))
|
||||
os.remove(os.path.join(config.get_videolibrary_path(), FOLDER, path_title, File))
|
||||
logger.info('Delete File: ' + str(filetools.join(config.get_videolibrary_path(), FOLDER, path_title, File)))
|
||||
filetools.remove(filetools.join(config.get_videolibrary_path(), FOLDER, path_title, File))
|
||||
|
||||
from platformcode import xbmc_videolibrary
|
||||
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ def next_ep(item):
|
||||
|
||||
time_over = False
|
||||
time_limit = time() + 30
|
||||
time_steps = [20,30,40,50,60]
|
||||
time_steps = [20,30,40,50,60,70,80,90,100,110,120]
|
||||
TimeFromEnd = time_steps[config.get_setting('next_ep_seconds')]
|
||||
|
||||
# wait until the video plays
|
||||
|
||||
+15
-3
@@ -14,6 +14,12 @@ except:
|
||||
import sqlite3 as sql
|
||||
|
||||
db = os.path.join(config.get_data_path(), 'kod_db.sqlite')
|
||||
if 'PROTOCOL_TLS' in ssl.__dict__:
|
||||
protocol = ssl.PROTOCOL_TLS
|
||||
elif 'PROTOCOL_SSLv23' in ssl.__dict__:
|
||||
protocol = ssl.PROTOCOL_SSLv23
|
||||
else:
|
||||
protocol = ssl.PROTOCOL_SSLv3
|
||||
|
||||
class CustomSocket(ssl.SSLSocket):
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -40,7 +46,7 @@ class CipherSuiteAdapter(host_header_ssl.HostHeaderSSLAdapter):
|
||||
def __init__(self, domain, CF=False, *args, **kwargs):
|
||||
self.conn = sql.connect(db)
|
||||
self.cur = self.conn.cursor()
|
||||
self.ssl_context = CustomContext(ssl.PROTOCOL_TLS if 'PROTOCOL_TLS' in ssl.__dict__ else ssl.PROTOCOL_SSLv3, domain)
|
||||
self.ssl_context = CustomContext(protocol, domain)
|
||||
self.CF = CF # if cloudscrape is in action
|
||||
self.cipherSuite = kwargs.pop('cipherSuite', ssl._DEFAULT_CIPHERS)
|
||||
|
||||
@@ -99,7 +105,7 @@ class CipherSuiteAdapter(host_header_ssl.HostHeaderSSLAdapter):
|
||||
domain = parse.netloc
|
||||
else:
|
||||
raise requests.exceptions.URLRequired
|
||||
self.ssl_context = CustomContext(ssl.PROTOCOL_TLS if 'PROTOCOL_TLS' in ssl.__dict__ else ssl.PROTOCOL_SSLv3, domain)
|
||||
self.ssl_context = CustomContext(protocol, domain)
|
||||
if self.CF:
|
||||
self.ssl_context.options |= (ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3 | ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1)
|
||||
self.ssl_context.set_ciphers(self.cipherSuite)
|
||||
@@ -123,7 +129,13 @@ class CipherSuiteAdapter(host_header_ssl.HostHeaderSSLAdapter):
|
||||
except Exception as e:
|
||||
logger.info('Request for ' + domain + ' with ip ' + ip + ' failed')
|
||||
logger.info(e)
|
||||
tryFlush = True
|
||||
if 'SSLError' in str(e):
|
||||
# disabilito
|
||||
config.set_setting("resolver_dns", False)
|
||||
request.url = realUrl
|
||||
ret = super(CipherSuiteAdapter, self).send(request, **kwargs)
|
||||
else:
|
||||
tryFlush = True
|
||||
if tryFlush and not flushedDns: # re-request ips and update cache
|
||||
logger.info('Flushing dns cache for ' + domain)
|
||||
return self.flushDns(request, domain, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user