Some Updates (#44)
* Add files via upload * Add files via upload * Add files via upload * Add files via upload * Update UpVid Update UpVid * Update Upvid Update Upvid * Update Upvid Update Upvid * Update Upvid.py Update Upvid.py * Updates TooItalia Channel Updates TooItalia Channel * Image Filmi Gratis Image Filmi Gratis * New Channel Filmigratis New Channel Filmigratis * Update ToonItalia Update ToonItalia * Add files via upload * Updates FilmiGratis Updates FilmiGratis * Updates ToonItalia Updates ToonItalia * Update regex Upvid Update regex Upvid * Update FilmiGratis Update FilmiGratis * Update Updvid regex Update Updvid regex * Update Filmigratis: Deleted print Update Filmigratis: Deleted print * Add thumb_add.png Add thumb_add.png * Updates and Add Thumbnail and Fanart in Community Updates and Add Thumbnail and Fanart in Community * Updates Community, add Thumbnail and Fanart Updates Community, add Thumbnail and Fanart * Add files via upload * Update openload.json Update regex in pattern * Updates Updates * Add files via upload * Add MondoLunatico 2.0 Add MondoLunatico 2.0 * Delete community.py * Delete toonitalia.py * Delete toonitalia.json * Delete filmigratis.json * Delete filmigratis.py * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Update Update * Add files via upload * Add files via upload * Add files via upload * Update community.py * Update wstream.py * Add files via upload * Fix Mondolunatico SerieTV Fix line 353 * Fixes Fixes
This commit is contained in:
@@ -191,7 +191,7 @@ def peliculas_serie(item):
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
patron = r'div class="cnt">.*?src="(.*?)".*?title="([A-Z|0-9].*?)".*?<a href="(.*?)"'
|
||||
patron = r'div class="cnt">[^s]+src="([^"]+).*?small>\s+[^A-Z](.*?)<.*?<a href="([^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedthumb, scrapedtitle, scrapedurl in matches:
|
||||
|
||||
65
channels/mondolunatico2.json
Normal file
65
channels/mondolunatico2.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"id": "mondolunatico2",
|
||||
"name": "MondoLunatico 2.0",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "mondolunatico2.png",
|
||||
"banner": "mondolunatico2.png",
|
||||
"categories": ["tvshow", "movie", "vosi", "anime"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi in Ricerca Globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Film",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces_num",
|
||||
"type": "list",
|
||||
"label": "Numero di link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"Italiano"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
500
channels/mondolunatico2.py
Normal file
500
channels/mondolunatico2.py
Normal file
@@ -0,0 +1,500 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per MondoLunatico 2.0
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
import urllib
|
||||
import urllib2
|
||||
import time
|
||||
|
||||
from channelselector import thumb
|
||||
from specials import autoplay, filtertools
|
||||
from core import scrapertools, httptools, tmdb, servertools, support, scrapertoolsV2
|
||||
from core.item import Item
|
||||
from platformcode import logger, config, platformtools
|
||||
|
||||
channel = "mondolunatico2"
|
||||
host = "https://mondolunatico.org/stream/"
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['verystream', 'wstream', 'openload', 'streamango']
|
||||
list_quality = ['HD', 'default']
|
||||
|
||||
def mainlist(item):
|
||||
|
||||
# Main options
|
||||
itemlist = []
|
||||
support.menu(itemlist, 'Novità bold', 'carousel', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Sub ITA bold', 'carousel_subita', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Ultime Richieste Inserite bold', 'carousel_request', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Film Nelle Sale bold', 'carousel_cinema', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Film Ultimi Inseriti submenu', 'carousel_last', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Film Top ImDb submenu', 'top_imdb', host + 'top-imdb/', contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Serie TV', 'carousel_episodes', host, contentType='episode', args='tvshows')
|
||||
support.menu(itemlist, 'Serie TV Top ImDb submenu', 'top_serie', host + 'top-imdb/', contentType='episode', args='tvshows')
|
||||
support.menu(itemlist, '[COLOR blue]Cerca...[/COLOR] bold', 'search', host)
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def carousel(item, regex=r'<h2>Ultime Richieste Inserite</h2>(.*?)<header>', contentType="movie"):
|
||||
logger.info("[mondolunatico2.py] carousel")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
block = scrapertools.find_single_match(data,regex)
|
||||
|
||||
patron = r'<article id.*?src="([^"]+).*?alt="([^"]+).*?href="([^"]+).*?,.([^<]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for scrapedthumbnail, scrapedtitle, scrapedurl, year in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
scrapedtitle = re.sub(r'[0-9]{4}', "", scrapedtitle)
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="findvideos",
|
||||
contentType=contentType,
|
||||
title=scrapedtitle + " " + "[COLOR orange][" + year + "][/COLOR]",
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
args=item.args,
|
||||
infoLabels={'year': year},
|
||||
thumbnail=scrapedthumbnail))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_subita(item):
|
||||
return carousel(item, regex=r'<h2>Film SubITA</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_request(item):
|
||||
return carousel(item, regex=r'<h2>Ultime Richieste Inserite</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_cinema(item):
|
||||
return carousel(item, regex=r'<h2>Nelle Sale</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_last(item):
|
||||
return carousel(item, regex=r'<h2>Ultimi Film Inseriti</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_episodes(item):
|
||||
return carousel(item, regex=r'<h2>Serie TV</h2>(.*?)<header>', contentType="episode")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def top_imdb(item, contentType='movie', regex=r'<h1.*?TOP IMDb.*?<h3>(.*?)<h3>'):
|
||||
logger.info("[mondolunatico2.py] top_imdb")
|
||||
itemlist = []
|
||||
|
||||
minpage = 20
|
||||
p = 1
|
||||
if '{}' in item.url:
|
||||
item.url, p = item.url.split('{}')
|
||||
p = int(p)
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
block = scrapertools.find_single_match(data, regex)
|
||||
|
||||
patron = r"<div class='image'><div class='[^']+'><a href='([^']+)'[^']+'([^']+)'[^']+'([^']+)"
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for i, (scrapedurl, scrapedthumbnail, scrapedtitle) in enumerate(matches):
|
||||
if (p - 1) * minpage > i: continue
|
||||
if i >= p * minpage: break
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
scrapedtitle = re.sub(r'[0-9]{4}', "", scrapedtitle)
|
||||
scrapedthumbnail = scrapedthumbnail.replace ("-90x135","").replace("/w92/", "/w600_and_h900_bestv2/")
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="findvideos" if "movie" in contentType else "episodios",
|
||||
contentType=item.contentType,
|
||||
contentTitle=scrapedtitle,
|
||||
title=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
thumbnail=scrapedthumbnail,
|
||||
args=item.args))
|
||||
|
||||
if len(matches) >= p * minpage:
|
||||
thumbnail = thumb(itemlist=[])
|
||||
scrapedurl = item.url + '{}' + str(p + 1)
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
contentType=item.contentType,
|
||||
action="top_imdb",
|
||||
title="[COLOR blue][B]Successivo >[/B][/COLOR]",
|
||||
thumbnail=thumbnail,
|
||||
url=scrapedurl))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def top_serie(item):
|
||||
return top_imdb(item, contentType='episode', regex=r'<h3>TVShows</h3>(.*?)<div class="sidebar scrolling">')
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("[mondolunatico2.py] " + item.url + " search " + texto)
|
||||
item.url = host + "?s=" + texto
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def peliculas(item):
|
||||
logger.info("[mondolunatico2.py] peliculas")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
patron = r'<div class="result-item">.*?<a href="([^"]+).*?src="([^"]+).*?alt="([^"]+).*?span class="([^"]+).*?<span class="year">([^<]+).*?<p>([^<]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, args, year, scrapedplot in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
scrapedtitle = re.sub(r'[0-9]{4}', "", scrapedtitle)
|
||||
type = "[COLOR aqua][Serie][/COLOR]" if "tvshows" in item.args else "[COLOR aqua][Film][/COLOR]"
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="episodios" if "tvshows" in item.args else "findvideos",
|
||||
contentType="episode" if "tvshows" in item.args else "movie",
|
||||
title=scrapedtitle + " " + "[COLOR orange][" + year + "][/COLOR]" + " " + type,
|
||||
fulltitle=scrapedtitle,
|
||||
thumbnail=scrapedthumbnail,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
args=args,
|
||||
infoLabels={'year':year},
|
||||
plot=scrapedplot))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("[mondolunatico2.py] findvideos")
|
||||
|
||||
if item.args == "tvshows":
|
||||
ret=support.dooplay_get_links(item, host)
|
||||
|
||||
if ret == []:
|
||||
return episodios(item)
|
||||
else:
|
||||
item.url = ret[0]["url"]
|
||||
return videoplayer(item)
|
||||
|
||||
if item.args == "movies" or "movie":
|
||||
return videoplayer(item)
|
||||
|
||||
else:
|
||||
return halfplayer(item)
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def episodios(item):
|
||||
logger.info("[mondolunatico2.py] episodios")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
if "<h2>Stagioni ed Episodi</h2>" in data:
|
||||
# Se è presente direttamente la lista Stagioni con i relativi episodi
|
||||
block = scrapertools.find_single_match(data, r'<h2>Stagioni ed Episodi</h2>(.*?)<div class=\'sbox\'>')
|
||||
patron = r'episodiotitle.*?href=\'([^\']+)\'>([^<]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="videoplayer",
|
||||
contentType=item.contentType,
|
||||
title=scrapedtitle,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
args=item.args,
|
||||
show=item.show))
|
||||
support.videolibrary(itemlist, item, 'color kod')
|
||||
return itemlist
|
||||
|
||||
if "File Unico..." in data:
|
||||
#Se è direttamente un file unico
|
||||
return dooplayer(item)
|
||||
|
||||
if "http://mondolunatico.org/stream/wp-content/uploads/2017/08/hand.gif" in data:
|
||||
# Keeplinks
|
||||
return keeplink(item)
|
||||
|
||||
else:
|
||||
# Se nella lista è presente Dooplayer con elenco episodi
|
||||
patron = r'<div class="sp-head" title="Espandi">([^<]+).*?<iframe.*?src="([^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if len(matches) > 1:
|
||||
for scrapedtitle, scrapedurl in matches:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="player_list",
|
||||
contentType=item.contentType,
|
||||
title=scrapedtitle,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
show=item.show))
|
||||
return itemlist
|
||||
else:
|
||||
return dooplayer(item)
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def player(item):
|
||||
logger.info ("[mondolunatico2.py] player")
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
item.url = scrapertools.find_single_match(item.url, r'([^/]+//[^/]+/[^/]+/[^/]+)')
|
||||
|
||||
if "https://mondolunatico.tk" in data:
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
link = scrapertools.find_single_match(data, r'<p><iframe src="(.*?/.*?)[A-Z]')
|
||||
item.url = link
|
||||
return halfplayer(item)
|
||||
|
||||
if "mondolunatico.tk" in item.url:
|
||||
return halfplayer(item)
|
||||
|
||||
#Scarica il link del video integrato nella pagina
|
||||
ret=support.dooplay_get_links(item, host)
|
||||
|
||||
#Prelevo il link del video integrato
|
||||
url = ret[0]["url"]
|
||||
|
||||
data = httptools.downloadpage(url, headers=headers).data
|
||||
|
||||
if "zmdi zmdi-playlist-audio zmdi-hc-3x" in data:
|
||||
return player_list(item)
|
||||
|
||||
else:
|
||||
#Correggo il link con il lin del POST
|
||||
url = url.replace("/v/", "/api/source/").replace("/p/", "/api/source/")
|
||||
|
||||
postData = urllib.urlencode({
|
||||
"r": "",
|
||||
"d": "modolunatico.tk",
|
||||
})
|
||||
|
||||
block = httptools.downloadpage(url, post=postData).data
|
||||
|
||||
patron = r'"file":".*?\/(r[^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
itemlist = []
|
||||
|
||||
for scrapedurl in matches:
|
||||
scrapedurl = "https://fvs.io/" + scrapedurl
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="play",
|
||||
contentType=item.contentType,
|
||||
title=item.title,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=item.title,
|
||||
url=scrapedurl,
|
||||
show=item.show))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def player_list(item):
|
||||
itemlist = []
|
||||
|
||||
# Scarico la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
if "panel_toggle toggleable" in data:
|
||||
# Prelevo il blocco lista puntate
|
||||
block = scrapertools.find_single_match(data, r'panel_toggle toggleable.*?(<div.*?)<!-- Javascript -->')
|
||||
|
||||
patron = r'data-url="([^"]+)">.*?([A-Z].*?) '
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
scrapedtitle = re.sub('mp4|avi|mkv', '', scrapedtitle)
|
||||
scrapedtitle = re.sub('WebRip|WEBRip|x264|AC3|1080p|DLMux|XviD-|BDRip|BluRay|HD|WEBMux|H264|BDMux|720p|TV|NFMux|DVDRip|DivX|DVDip|Ac3|Dvdrip|Mux|NovaRip|DVD|SAT|Divx', '', scrapedtitle)
|
||||
scrapedtitle = re.sub('ITA|ENG|Italian|SubITA|SUBITA|iTALiAN|LiAN|Ita', '', scrapedtitle)
|
||||
scrapedtitle = re.sub('Pir8|UBi|M L|BEDLAM|REPACK|DD5.1|bloody|SVU', '', scrapedtitle)
|
||||
scrapedtitle = scrapedtitle.replace(".", " ").replace(" - ", " ").replace(" -", "").replace(" ", "")
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="halfplayer",
|
||||
contentType=item.contentType,
|
||||
title=scrapedtitle,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url="https://mondolunatico.tk" + scrapedurl,
|
||||
show=item.show))
|
||||
|
||||
support.videolibrary(itemlist, item, 'color kod')
|
||||
|
||||
return itemlist
|
||||
|
||||
else:
|
||||
return player(item)
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def dooplayer(item):
|
||||
logger.info ("[mondolunatico2.py] dooplayer")
|
||||
itemlist = []
|
||||
|
||||
url = item.url
|
||||
data = httptools.downloadpage(url, headers=headers).data
|
||||
|
||||
link= scrapertools.find_single_match(data, r'(https://mondolunatico.tk/./[^"]+)')
|
||||
|
||||
data = httptools.downloadpage(link, headers=headers).data
|
||||
if "panel_toggle toggleable" in data:
|
||||
item.url = link
|
||||
return player_list(item)
|
||||
|
||||
# Correggo il link con il lin del POST
|
||||
link1 = link.replace("/v/", "/api/source/").replace("/p/", "/api/source/")
|
||||
|
||||
postData = urllib.urlencode({
|
||||
"r": link,
|
||||
"d": "modolunatico.tk",
|
||||
})
|
||||
|
||||
block = httptools.downloadpage(link1, post=postData).data
|
||||
|
||||
patron = r'"file":".*?\/(r[^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for scrapedurl in matches:
|
||||
scrapedurl = "https://fvs.io/" + scrapedurl
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="play",
|
||||
contentType=item.contentType,
|
||||
title=item.title,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=item.title,
|
||||
url=scrapedurl,
|
||||
show=item.show))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
support.videolibrary(itemlist, item, 'color kod')
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def keeplink(item):
|
||||
itemlist = []
|
||||
|
||||
# Scarico la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
# Prendo url keeplink
|
||||
patron = 'href="(https?://www\.keeplinks\.(?:co|eu)/p92/([^"]+))"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for keeplinks, id in matches:
|
||||
headers = [['Cookie', 'flag[' + id + ']=1; defaults=1; nopopatall=' + str(int(time.time()))],
|
||||
['Referer', keeplinks]]
|
||||
|
||||
html = httptools.downloadpage(keeplinks, headers=headers).data
|
||||
data += str(scrapertools.find_multiple_matches(html, '</lable><a href="([^"]+)" target="_blank"'))
|
||||
|
||||
patron = 'src="([^"]+)" frameborder="0"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl in matches:
|
||||
data += httptools.downloadpage(scrapedurl).data
|
||||
|
||||
for videoitem in servertools.find_video_items(data=data):
|
||||
videoitem.title = item.title + " - " + videoitem.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.show = item.show
|
||||
videoitem.plot = item.plot
|
||||
videoitem.channel = item.channel
|
||||
itemlist.append(videoitem)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def videoplayer(item):
|
||||
logger.info("[mondolunatico2.py] videoplayer")
|
||||
itemlist = []
|
||||
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
server = link['server'][:link['server'].find(".")]
|
||||
if server == "":
|
||||
server = "mondolunatico"
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="player" if "mondolunatico" in server else "play",
|
||||
title=server + " [COLOR blue][" + link['title'] + "][/COLOR]",
|
||||
url=link['url'],
|
||||
server=server,
|
||||
fulltitle=item.fulltitle,
|
||||
thumbnail=item.thumbnail,
|
||||
show=item.show,
|
||||
quality=link['title'],
|
||||
contentType=item.contentType,
|
||||
folder=False))
|
||||
|
||||
support.videolibrary(itemlist, item, 'color kod', function_level=2)
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def halfplayer(item):
|
||||
logger.info("[mondolunatico2.py] halfplayer")
|
||||
|
||||
url=item.url
|
||||
|
||||
# Correggo il link con il lin del POST
|
||||
url = url.replace("/v/", "/api/source/").replace("/p/", "/api/source/")
|
||||
|
||||
postData = urllib.urlencode({
|
||||
"r": "",
|
||||
"d": "modolunatico.tk",
|
||||
})
|
||||
|
||||
block = httptools.downloadpage(url, post=postData).data
|
||||
|
||||
patron = r'"file":".*?\/(r[^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for scrapedurl in matches:
|
||||
item.url = "https://fvs.io/" + scrapedurl
|
||||
item.server = ""
|
||||
itemlist = platformtools.play_video(item, force_direct=True, autoplay=True)
|
||||
|
||||
return itemlist
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import re
|
||||
|
||||
from core import scrapertools, httptools, tmdb, support
|
||||
from core import scrapertools, httptools, tmdb, support, servertools
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from specials import autoplay
|
||||
@@ -84,6 +84,7 @@ def insert(item):
|
||||
folder=True))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -253,30 +254,58 @@ def episodios(item):
|
||||
patron = r'<br /> <a href="([^"]+)"\s*target="_blank"\s*rel[^>]+>([^<]+)</a>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
if 'Wikipedia' not in scrapedurl:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).replace("×", "x")
|
||||
scrapedtitle = scrapedtitle.replace("_", " ")
|
||||
scrapedtitle = scrapedtitle.replace(".mp4", "")
|
||||
# puntata = scrapertools.find_single_match(scrapedtitle, '[0-9]+x[0-9]+')
|
||||
puntata = scrapedtitle
|
||||
for i in itemlist:
|
||||
if i.args == puntata: #è già stata aggiunta
|
||||
i.url += " " + scrapedurl
|
||||
break
|
||||
if "https://vcrypt.net" in data:
|
||||
patron = r'(?:<p>|<br />)([^<]+)<a href="([^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
args = puntata,
|
||||
show=item.show,
|
||||
plot=item.plot))
|
||||
for scrapedtitle, scrapedurl in matches:
|
||||
if 'Wikipedia' not in scrapedurl:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).replace("×", "x")
|
||||
scrapedtitle = scrapedtitle.replace("_", " ")
|
||||
scrapedtitle = scrapedtitle.replace(".mp4", "")
|
||||
puntata = scrapedtitle
|
||||
for i in itemlist:
|
||||
if i.args == puntata: # è già stata aggiunta
|
||||
i.url += " " + scrapedurl
|
||||
break
|
||||
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
args=puntata,
|
||||
show=item.show,
|
||||
plot=item.plot))
|
||||
else:
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
if 'Wikipedia' not in scrapedurl:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).replace("×", "x")
|
||||
scrapedtitle = scrapedtitle.replace("_", " ")
|
||||
scrapedtitle = scrapedtitle.replace(".mp4", "")
|
||||
# puntata = scrapertools.find_single_match(scrapedtitle, '[0-9]+x[0-9]+')
|
||||
puntata = scrapedtitle
|
||||
for i in itemlist:
|
||||
if i.args == puntata: #è già stata aggiunta
|
||||
i.url += " " + scrapedurl
|
||||
break
|
||||
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
args = puntata,
|
||||
show=item.show,
|
||||
plot=item.plot))
|
||||
|
||||
support.videolibrary(itemlist, item, 'color kod')
|
||||
|
||||
|
||||
BIN
resources/media/channels/thumb/mondolunatico2.png
Normal file
BIN
resources/media/channels/thumb/mondolunatico2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
resources/media/themes/default/thumb_add.png
Normal file
BIN
resources/media/themes/default/thumb_add.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
@@ -4,7 +4,7 @@
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(?:openload|oload|openloads).*?/(?:embed|f|e)/([0-9a-zA-Z-_]+)",
|
||||
"pattern": "(?:openload|oload|openloads).*?/(?:embed|f|e|f[0-9])/([0-9a-zA-Z-_]+)",
|
||||
"url": "https://openload.co/embed/\\1/"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,16 +3,20 @@
|
||||
# -*- Created for Alfa-addon -*-
|
||||
# -*- By the Alfa Develop Group -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
import os
|
||||
|
||||
from channelselector import get_thumb
|
||||
from core import httptools
|
||||
from core import jsontools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import jsontools
|
||||
from channelselector import get_thumb
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import logger, config, platformtools
|
||||
from specials import autoplay
|
||||
from specials import filtertools
|
||||
|
||||
list_data = {}
|
||||
|
||||
@@ -36,7 +40,7 @@ def mainlist(item):
|
||||
def show_channels(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
|
||||
context = [{"title": config.get_localized_string(50005),
|
||||
"action": "remove_channel",
|
||||
"channel": "community"}]
|
||||
@@ -49,14 +53,18 @@ def show_channels(item):
|
||||
itemlist.append(Item(channel=item.channel, title=config.get_localized_string(70676), action='add_channel', thumbnail=get_thumb('add.png')))
|
||||
|
||||
for key, channel in json['channels'].items():
|
||||
|
||||
if 'poster' in channel:
|
||||
poster = channel['poster']
|
||||
if 'thumbnail' in channel:
|
||||
thumbnail = channel['thumbnail']
|
||||
else:
|
||||
poster = ''
|
||||
thumbnail = ''
|
||||
|
||||
if 'fanart' in channel:
|
||||
fanart = channel['fanart']
|
||||
else:
|
||||
fanart = ''
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title=channel['channel_name'], url=channel['path'],
|
||||
thumbnail=poster, action='show_menu', channel_id = key, context=context))
|
||||
thumbnail=thumbnail, fanart=fanart, action='show_menu', channel_id = key, context=context))
|
||||
return itemlist
|
||||
|
||||
def load_json(item):
|
||||
@@ -80,7 +88,15 @@ def show_menu(item):
|
||||
|
||||
if "menu" in json_data:
|
||||
for option in json_data['menu']:
|
||||
itemlist.append(Item(channel=item.channel, title=option['title'], action='show_menu', url=option['link']))
|
||||
if 'thumbnail' in json_data:
|
||||
thumbnail = option['thumbnail']
|
||||
else:
|
||||
thumbnail = ''
|
||||
if 'fanart' in option and option['fanart']:
|
||||
fanart = option['fanart']
|
||||
else:
|
||||
fanart = item.fanart
|
||||
itemlist.append(Item(channel=item.channel, title=option['title'], thumbnail=thumbnail, fanart=fanart, action='show_menu', url=option['link']))
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
@@ -95,9 +111,6 @@ def show_menu(item):
|
||||
|
||||
return list_all(item)
|
||||
|
||||
|
||||
return itemlist
|
||||
|
||||
def list_all(item):
|
||||
logger.info()
|
||||
|
||||
@@ -161,7 +174,7 @@ def episodesxseason(item):
|
||||
infoLabels['season'] = season_number
|
||||
infoLabels['episode'] = episode_number
|
||||
|
||||
title = config.get_localized_string(70677) % (season_number, episode_number, episode_number)
|
||||
title = config.get_localized_string(70677) + ' %s' % (episode_number)
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title=title, url=episode, action='findvideos',
|
||||
contentEpisodeNumber=episode_number, infoLabels=infoLabels))
|
||||
@@ -195,6 +208,7 @@ def findvideos(item):
|
||||
|
||||
def add_channel(item):
|
||||
logger.info()
|
||||
import xbmc
|
||||
import xbmcgui
|
||||
channel_to_add = {}
|
||||
json_file = ''
|
||||
@@ -224,6 +238,8 @@ def add_channel(item):
|
||||
platformtools.dialog_ok(config.get_localized_string(20000), config.get_localized_string(70682))
|
||||
return
|
||||
channel_to_add['channel_name'] = json_file['channel_name']
|
||||
channel_to_add['thumbnail'] = json_file['thumbnail']
|
||||
channel_to_add['fanart'] = json_file['fanart']
|
||||
path = os.path.join(config.get_data_path(), 'community_channels.json')
|
||||
|
||||
community_json = open(path, "r")
|
||||
@@ -240,6 +256,8 @@ def add_channel(item):
|
||||
|
||||
def remove_channel(item):
|
||||
logger.info()
|
||||
import xbmc
|
||||
import xbmcgui
|
||||
path = os.path.join(config.get_data_path(), 'community_channels.json')
|
||||
|
||||
community_json = open(path, "r")
|
||||
|
||||
Reference in New Issue
Block a user