Merge branch 'master' of https://github.com/alfa-addon/addon
This commit is contained in:
@@ -32,7 +32,7 @@ def lista(item):
|
|||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
for scrapedurl, scrapedthumbnail, duration, scrapedtitle in matches:
|
for scrapedurl, scrapedthumbnail, duration, scrapedtitle in matches:
|
||||||
if "/embed-" not in scrapedurl:
|
if "/embed-" not in scrapedurl:
|
||||||
scrapedurl = scrapedurl.replace("datoporn.com/", "datoporn.com/embed-") + ".html"
|
scrapedurl = scrapedurl.replace("dato.porn/", "dato.porn/embed-") + ".html"
|
||||||
if duration:
|
if duration:
|
||||||
scrapedtitle = "%s - %s" % (duration, scrapedtitle)
|
scrapedtitle = "%s - %s" % (duration, scrapedtitle)
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ def mainlist(item):
|
|||||||
thumbnail='https://s18.postimg.org/fwvaeo6qh/todas.png',
|
thumbnail='https://s18.postimg.org/fwvaeo6qh/todas.png',
|
||||||
fanart='https://s18.postimg.org/fwvaeo6qh/todas.png',
|
fanart='https://s18.postimg.org/fwvaeo6qh/todas.png',
|
||||||
url ='https://www.playpornx.net/category/porn-movies/?filter=date'))
|
url ='https://www.playpornx.net/category/porn-movies/?filter=date'))
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url='http://www.playpornx.net/?s=',
|
itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url='http://www.playpornx.net/?s=',
|
||||||
thumbnail='https://s30.postimg.org/pei7txpa9/buscar.png',
|
thumbnail='https://s30.postimg.org/pei7txpa9/buscar.png',
|
||||||
fanart='https://s30.postimg.org/pei7txpa9/buscar.png'))
|
fanart='https://s30.postimg.org/pei7txpa9/buscar.png'))
|
||||||
@@ -30,7 +31,6 @@ def lista(item):
|
|||||||
if item.url == '': item.url = host
|
if item.url == '': item.url = host
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||||
logger.debug(data)
|
|
||||||
patron = 'role=article><a href=(.*?) rel=bookmark title=(.*?)>.*?src=(.*?) class'
|
patron = 'role=article><a href=(.*?) rel=bookmark title=(.*?)>.*?src=(.*?) class'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ def lista(item):
|
|||||||
|
|
||||||
if itemlist != []:
|
if itemlist != []:
|
||||||
actual_page_url = item.url
|
actual_page_url = item.url
|
||||||
next_page = scrapertools.find_single_match(data, 'rel="next" href="([^"]+)"')
|
next_page = scrapertools.find_single_match(data, '<link rel=next href=(.*?) \/>')
|
||||||
if next_page != '':
|
if next_page != '':
|
||||||
itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=next_page,
|
itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=next_page,
|
||||||
thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png', extra=item.extra))
|
thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png', extra=item.extra))
|
||||||
|
|||||||
@@ -866,10 +866,11 @@ def overwrite_tools(item):
|
|||||||
from core import videolibrarytools
|
from core import videolibrarytools
|
||||||
|
|
||||||
seleccion = platformtools.dialog_yesno("Sobrescribir toda la videoteca",
|
seleccion = platformtools.dialog_yesno("Sobrescribir toda la videoteca",
|
||||||
"Esto puede llevar algun tiempo.",
|
"Esto puede llevar algún tiempo.",
|
||||||
"¿Desea continuar?")
|
"¿Desea continuar?")
|
||||||
if seleccion == 1:
|
if seleccion == 1:
|
||||||
heading = 'Sobrescribiendo videoteca....'
|
# tvshows
|
||||||
|
heading = 'Sobrescribiendo videoteca....SERIES'
|
||||||
p_dialog = platformtools.dialog_progress_bg('alfa', heading)
|
p_dialog = platformtools.dialog_progress_bg('alfa', heading)
|
||||||
p_dialog.update(0, '')
|
p_dialog.update(0, '')
|
||||||
|
|
||||||
@@ -893,5 +894,42 @@ def overwrite_tools(item):
|
|||||||
|
|
||||||
# ... y la volvemos a añadir
|
# ... y la volvemos a añadir
|
||||||
videolibrary_service.update(path, p_dialog, i, t, serie, 3)
|
videolibrary_service.update(path, p_dialog, i, t, serie, 3)
|
||||||
|
|
||||||
p_dialog.close()
|
p_dialog.close()
|
||||||
|
|
||||||
|
# movies
|
||||||
|
heading = 'Sobrescribiendo videoteca....PELICULAS'
|
||||||
|
p_dialog2 = platformtools.dialog_progress_bg('alfa', heading)
|
||||||
|
p_dialog2.update(0, '')
|
||||||
|
|
||||||
|
movies_list = []
|
||||||
|
for path, folders, files in filetools.walk(videolibrarytools.MOVIES_PATH):
|
||||||
|
movies_list.extend([filetools.join(path, f) for f in files if f.endswith(".json")])
|
||||||
|
|
||||||
|
logger.debug("movies_list %s" % movies_list)
|
||||||
|
|
||||||
|
if movies_list:
|
||||||
|
t = float(100) / len(movies_list)
|
||||||
|
|
||||||
|
for i, movie_json in enumerate(movies_list):
|
||||||
|
try:
|
||||||
|
from core import jsontools
|
||||||
|
path = filetools.dirname(movie_json)
|
||||||
|
movie = Item().fromjson(filetools.read(movie_json))
|
||||||
|
|
||||||
|
# Eliminamos la carpeta con la pelicula ...
|
||||||
|
filetools.rmdirtree(path)
|
||||||
|
|
||||||
|
import math
|
||||||
|
heading = 'Actualizando videoteca....'
|
||||||
|
|
||||||
|
p_dialog2.update(int(math.ceil((i + 1) * t)), heading, "%s: %s" % (movie.contentTitle,
|
||||||
|
movie.channel.capitalize()))
|
||||||
|
# ... y la volvemos a añadir
|
||||||
|
videolibrarytools.save_movie(movie)
|
||||||
|
except Exception, ex:
|
||||||
|
logger.error("Error al crear de nuevo la película")
|
||||||
|
template = "An exception of type %s occured. Arguments:\n%r"
|
||||||
|
message = template % (type(ex).__name__, ex.args)
|
||||||
|
logger.error(message)
|
||||||
|
|
||||||
|
p_dialog2.close()
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ host = "http://ver-pelis.me"
|
|||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
i = 0
|
|
||||||
global i
|
global i
|
||||||
|
i = 0
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(title = "[COLOR oldlace]Películas[/COLOR]", action = "scraper", url = host + "/ver/",
|
item.clone(title = "[COLOR oldlace]Películas[/COLOR]", action = "scraper", url = host + "/ver/",
|
||||||
thumbnail = "http://imgur.com/36xALWc.png", fanart = "http://imgur.com/53dhEU4.jpg",
|
thumbnail = "http://imgur.com/36xALWc.png", fanart = "http://imgur.com/53dhEU4.jpg",
|
||||||
@@ -49,7 +49,6 @@ def categoria_anno(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
bloque = scrapertools.find_single_match(data, 'mobile_menu.*?(%s.*?)</ul>' %item.extra)
|
bloque = scrapertools.find_single_match(data, 'mobile_menu.*?(%s.*?)</ul>' %item.extra)
|
||||||
logger.info("Intel44 %s" %bloque)
|
|
||||||
patron = '(?is)<li.*?a href="([^"]+)'
|
patron = '(?is)<li.*?a href="([^"]+)'
|
||||||
patron += '.*?title="[^"]+">([^<]+)'
|
patron += '.*?title="[^"]+">([^<]+)'
|
||||||
match = scrapertools.find_multiple_matches(bloque, patron)
|
match = scrapertools.find_multiple_matches(bloque, patron)
|
||||||
@@ -80,8 +79,8 @@ def scraper(item):
|
|||||||
global i
|
global i
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||||
patron = scrapertools.find_multiple_matches(data,
|
patron = '<a class="thumb cluetip".*?href="([^"]+)".*?src="([^"]+)" alt="([^"]+)".*?"res">([^"]+)</span>'
|
||||||
'<a class="thumb cluetip".*?href="([^"]+)".*?src="([^"]+)" alt="([^"]+)".*?"res">([^"]+)</span>')
|
patron = scrapertools.find_multiple_matches(data, patron)
|
||||||
if len(patron) > 20:
|
if len(patron) > 20:
|
||||||
if item.next_page != 20:
|
if item.next_page != 20:
|
||||||
url_next_page = item.url
|
url_next_page = item.url
|
||||||
@@ -91,9 +90,7 @@ def scraper(item):
|
|||||||
else:
|
else:
|
||||||
patron = patron[item.i:][:20]
|
patron = patron[item.i:][:20]
|
||||||
next_page = 20
|
next_page = 20
|
||||||
|
|
||||||
url_next_page = item.url
|
url_next_page = item.url
|
||||||
|
|
||||||
for url, thumb, title, cuality in patron:
|
for url, thumb, title, cuality in patron:
|
||||||
title = re.sub(r"Imagen", "", title)
|
title = re.sub(r"Imagen", "", title)
|
||||||
titulo = "[COLOR floralwhite]" + title + "[/COLOR]" + " " + "[COLOR crimson][B]" + cuality + "[/B][/COLOR]"
|
titulo = "[COLOR floralwhite]" + title + "[/COLOR]" + " " + "[COLOR crimson][B]" + cuality + "[/B][/COLOR]"
|
||||||
@@ -101,31 +98,13 @@ def scraper(item):
|
|||||||
|
|
||||||
if item.extra != "search":
|
if item.extra != "search":
|
||||||
item.i += 1
|
item.i += 1
|
||||||
new_item = item.clone(action="findvideos", title=titulo, url=url, thumbnail=thumb, fulltitle=title,
|
itemlist.append(item.clone(action="findvideos", title=titulo, url=url, thumbnail=thumb, fulltitle=title,
|
||||||
contentTitle=title, contentType="movie", library=True)
|
contentTitle=title, contentType="movie", library=True))
|
||||||
new_item.infoLabels['year'] = get_year(url)
|
|
||||||
itemlist.append(new_item)
|
|
||||||
|
|
||||||
## Paginación
|
## Paginación
|
||||||
if url_next_page:
|
if url_next_page:
|
||||||
itemlist.append(item.clone(title="[COLOR crimson]Siguiente >>[/COLOR]", url=url_next_page, next_page=next_page,
|
itemlist.append(item.clone(title="[COLOR crimson]Siguiente >>[/COLOR]", url=url_next_page, next_page=next_page,
|
||||||
thumbnail="http://imgur.com/w3OMy2f.png", i=item.i))
|
thumbnail="http://imgur.com/w3OMy2f.png", i=item.i))
|
||||||
try:
|
|
||||||
from core import tmdb
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
|
||||||
for item in itemlist:
|
|
||||||
if not "Siguiente >>" in item.title:
|
|
||||||
if "0." in str(item.infoLabels['rating']):
|
|
||||||
item.infoLabels['rating'] = "[COLOR indianred]Sin puntuacíon[/COLOR]"
|
|
||||||
else:
|
|
||||||
item.infoLabels['rating'] = "[COLOR orange]" + str(item.infoLabels['rating']) + "[/COLOR]"
|
|
||||||
item.title = item.title + " " + str(item.infoLabels['rating'])
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
for item_tmdb in itemlist:
|
|
||||||
logger.info(str(item_tmdb.infoLabels['tmdb_id']))
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -137,10 +116,12 @@ def findvideos(item):
|
|||||||
if data_post:
|
if data_post:
|
||||||
post = 'id=' + data_post[0] + '&slug=' + data_post[1]
|
post = 'id=' + data_post[0] + '&slug=' + data_post[1]
|
||||||
data_info = httptools.downloadpage(host + '/ajax/cargar_video.php', post=post).data
|
data_info = httptools.downloadpage(host + '/ajax/cargar_video.php', post=post).data
|
||||||
enlaces = scrapertools.find_multiple_matches(data_info,
|
patron = """</i> ([^<]+)"""
|
||||||
"</i> (\w+ \w+).*?<a onclick=\"load_player\('([^']+)','([^']+)', ([^']+),.*?REPRODUCIR\">([^']+)</a>")
|
patron += """.*?<a onclick=\"load_player\('([^']+)"""
|
||||||
|
patron += """','([^']+)', ([^']+),.*?REPRODUCIR\">([^']+)</a>"""
|
||||||
|
enlaces = scrapertools.find_multiple_matches(data_info, patron)
|
||||||
for server, id_enlace, name, number, idioma_calidad in enlaces:
|
for server, id_enlace, name, number, idioma_calidad in enlaces:
|
||||||
|
server = server.strip()
|
||||||
if "SUBTITULOS" in idioma_calidad and not "P" in idioma_calidad:
|
if "SUBTITULOS" in idioma_calidad and not "P" in idioma_calidad:
|
||||||
idioma_calidad = idioma_calidad.replace("SUBTITULOS", "VO")
|
idioma_calidad = idioma_calidad.replace("SUBTITULOS", "VO")
|
||||||
idioma_calidad = idioma_calidad.replace("VO", "[COLOR orangered] VO[/COLOR]")
|
idioma_calidad = idioma_calidad.replace("VO", "[COLOR orangered] VO[/COLOR]")
|
||||||
@@ -164,14 +145,23 @@ def findvideos(item):
|
|||||||
url = host + "/ajax/video.php?id=" + id_enlace + "&slug=" + name + "&quality=" + number
|
url = host + "/ajax/video.php?id=" + id_enlace + "&slug=" + name + "&quality=" + number
|
||||||
|
|
||||||
if not "Ultra" in server:
|
if not "Ultra" in server:
|
||||||
server = "[COLOR cyan][B]" + server + "[/B][/COLOR]"
|
server = "[COLOR cyan][B]" + server + " [/B][/COLOR]"
|
||||||
extra = ""
|
extra = ""
|
||||||
else:
|
else:
|
||||||
server = "[COLOR yellow][B]" + server + "[/B][/COLOR]"
|
server = "[COLOR yellow][B]Gvideo [/B][/COLOR]"
|
||||||
extra = "yes"
|
extra = "yes"
|
||||||
title = server.strip() + " " + idioma_calidad
|
title = server.strip() + " " + idioma_calidad
|
||||||
itemlist.append(Item(channel=item.channel, action="play", title=title, url=url, fanart=item.fanart,
|
itemlist.append(Item(
|
||||||
thumbnail=item.thumbnail, fulltitle=item.title, extra=extra, folder=True))
|
channel = item.channel,
|
||||||
|
action = "play",
|
||||||
|
title = title,
|
||||||
|
url = url,
|
||||||
|
fanart = item.fanart,
|
||||||
|
thumbnail = item.thumbnail,
|
||||||
|
fulltitle = item.fulltitle,
|
||||||
|
extra = extra,
|
||||||
|
folder = True
|
||||||
|
))
|
||||||
if item.library and config.get_videolibrary_support() and len(itemlist) > 0:
|
if item.library and config.get_videolibrary_support() and len(itemlist) > 0:
|
||||||
infoLabels = {'tmdb_id': item.infoLabels['tmdb_id'],
|
infoLabels = {'tmdb_id': item.infoLabels['tmdb_id'],
|
||||||
'title': item.infoLabels['title']}
|
'title': item.infoLabels['title']}
|
||||||
@@ -198,16 +188,13 @@ def play(item):
|
|||||||
url = scrapertools.find_single_match(data, '(?is)iframe src="([^"]+)"')
|
url = scrapertools.find_single_match(data, '(?is)iframe src="([^"]+)"')
|
||||||
videolist = servertools.find_video_items(data=url)
|
videolist = servertools.find_video_items(data=url)
|
||||||
for video in videolist:
|
for video in videolist:
|
||||||
itemlist.append(Item(channel=item.channel, url=video.url, server=video.server,
|
itemlist.append(Item(
|
||||||
title="[COLOR floralwhite][B]" + video.server + "[/B][/COLOR]", action="play",
|
channel = item.channel,
|
||||||
folder=False))
|
url = video.url,
|
||||||
|
server = video.server,
|
||||||
|
fulltitle = item.fulltitle,
|
||||||
|
thumbnail = item.thumbnail,
|
||||||
|
action = "play"
|
||||||
|
))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def get_year(url):
|
|
||||||
data = httptools.downloadpage(url).data
|
|
||||||
year = scrapertools.find_single_match(data, '<p><strong>Año:</strong>(.*?)</p>')
|
|
||||||
if year == "":
|
|
||||||
year = " "
|
|
||||||
return year
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
@@ -26,7 +26,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
|
|
||||||
media_urls = scrapertools.find_multiple_matches(data, 'file\:"([^"]+\.mp4)",label:"([^"]+)"')
|
media_urls = scrapertools.find_multiple_matches(data, 'file\:"([^"]+\.mp4)",label:"([^"]+)"')
|
||||||
if not media_urls:
|
if not media_urls:
|
||||||
match = scrapertools.find_single_match(data, "<script type='text/javascript'>(.*?)</script>")
|
match = scrapertools.find_single_match(data, "p,a,c,k(.*?)</script>")
|
||||||
data = jsunpack.unpack(match)
|
data = jsunpack.unpack(match)
|
||||||
media_urls = scrapertools.find_multiple_matches(data, 'file\:"([^"]+\.mp4)",label:"([^"]+)"')
|
media_urls = scrapertools.find_multiple_matches(data, 'file\:"([^"]+\.mp4)",label:"([^"]+)"')
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "downace.com/embed/(.*?)",
|
"pattern": "downace.com/embed/([A-z0-9]+)",
|
||||||
"url": "https://downace.com/embed/\\1"
|
"url": "https://downace.com/embed/\\1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -46,4 +46,4 @@
|
|||||||
],
|
],
|
||||||
"thumbnail": "https://s12.postimg.org/4n9fmdy7x/logo-downace.png",
|
"thumbnail": "https://s12.postimg.org/4n9fmdy7x/logo-downace.png",
|
||||||
"version": 1
|
"version": 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
page_url = scrapertools.find_single_match(page_url, ".*?video/[0-9]+")
|
page_url = scrapertools.find_single_match(page_url, ".*?video/[0-9]+")
|
||||||
|
|
||||||
data = httptools.downloadpage(page_url, headers = headers).data
|
data = httptools.downloadpage(page_url, headers = headers).data
|
||||||
logger.info("Intel11 %s" %data)
|
|
||||||
patron = 'mime":"([^"]+)"'
|
patron = 'mime":"([^"]+)"'
|
||||||
patron += '.*?url":"([^"]+)"'
|
patron += '.*?url":"([^"]+)"'
|
||||||
patron += '.*?quality":"([^"]+)"'
|
patron += '.*?quality":"([^"]+)"'
|
||||||
|
|||||||
Reference in New Issue
Block a user