@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import time
|
||||
@@ -11,7 +11,7 @@ from core import jsontools
|
||||
from core import servertools
|
||||
from core import scrapertools
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from platformcode import config, logger
|
||||
|
||||
HOST = "https://animeflv.net/"
|
||||
|
||||
@@ -242,7 +242,7 @@ def episodios(item):
|
||||
else:
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel, item.show, 1, episode)
|
||||
|
||||
title = "%s: %sx%s" % (item.title, season, str(episode).zfill(2))
|
||||
title = "%sx%s : %s" % (season, str(episode).zfill(2), item.title)
|
||||
|
||||
itemlist.append(item.clone(action="findvideos", title=title, url=url, thumbnail=thumb, fulltitle=title,
|
||||
fanart=item.thumbnail, contentType="episode"))
|
||||
@@ -263,11 +263,15 @@ def episodios(item):
|
||||
else:
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel, item.show, 1, episode)
|
||||
|
||||
title = "%s: %sx%s" % (item.title, season, str(episode).zfill(2))
|
||||
title = "%sx%s : %s" % (season, str(episode).zfill(2), item.title)
|
||||
|
||||
itemlist.append(item.clone(action="findvideos", title=title, url=url, thumbnail=thumb, fulltitle=title,
|
||||
fanart=item.thumbnail, contentType="episode"))
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url,
|
||||
action="add_serie_to_library", extra="episodios", show=item.title ))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
@@ -315,7 +315,6 @@ def episodios(item):
|
||||
itemlist.append(Item(channel=item.channel, title="Descargar todos los episodios",
|
||||
url=item.url, action="download_all_episodes", extra="episodios",
|
||||
show=item.show))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -324,23 +323,48 @@ def findvideos(item):
|
||||
|
||||
itemlist = []
|
||||
|
||||
page_html = get_url_contents(item.url)
|
||||
|
||||
regex_api = r'http://player\.animeflv\.me/[^\"]+'
|
||||
iframe_url = scrapertools.find_single_match(page_html, regex_api)
|
||||
|
||||
iframe_html = get_url_contents(iframe_url)
|
||||
|
||||
regex_video_list = r'var part = \[([^\]]+)'
|
||||
|
||||
videos_html = scrapertools.find_single_match(iframe_html, regex_video_list)
|
||||
videos = re.findall('"([^"]+)"', videos_html, re.DOTALL)
|
||||
|
||||
qualities = ["360", "480", "720", "1080"]
|
||||
|
||||
for quality_id, video_url in enumerate(videos):
|
||||
if 'player' in item.url:
|
||||
page_html = get_url_contents(item.url)
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", page_html)
|
||||
patron_open='<!-- Start .+? -->.+?<iframe src="(.+?)"'
|
||||
video_url = scrapertools.find_single_match(data, patron_open)
|
||||
#for server,video_url in videos_url:
|
||||
server="openload"
|
||||
itemlist.append(Item(channel=item.channel, action="play", url=video_url, show=re.escape(item.show),
|
||||
title="Ver en calidad [{0}]".format(qualities[quality_id]), plot=item.plot,
|
||||
title="Ver en "+server+" [{0}]".format(qualities[1]), plot=item.plot, server=server,
|
||||
folder=True, fulltitle=item.title, viewmode="movies_with_plot"))
|
||||
|
||||
else:
|
||||
|
||||
page_html = get_url_contents(item.url)
|
||||
|
||||
regex_api = r'http://player\.animeflv\.me/[^\"]+'
|
||||
iframe_url = scrapertools.find_single_match(page_html, regex_api)
|
||||
|
||||
iframe_html = get_url_contents(iframe_url)
|
||||
|
||||
regex_video_list = r'var part = \[([^\]]+)'
|
||||
|
||||
videos_html = scrapertools.find_single_match(iframe_html, regex_video_list)
|
||||
videos = re.findall('"([^"]+)"', videos_html, re.DOTALL)
|
||||
|
||||
|
||||
for quality_id, video_url in enumerate(videos):
|
||||
itemlist.append(Item(channel=item.channel, action="play", url=video_url, show=re.escape(item.show),
|
||||
title="Ver en calidad [{0}]".format(qualities[quality_id]), plot=item.plot,
|
||||
folder=True, fulltitle=item.title, viewmode="movies_with_plot"))
|
||||
patron_open='<div id="player"><iframe src="(.+?)"'
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", page_html)
|
||||
|
||||
videos_html_other = scrapertools.find_single_match(data, patron_open)
|
||||
#for video_url in videos_html_other:
|
||||
video_url = videos_html_other
|
||||
a=1
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", url=video_url, show=re.escape(item.show),
|
||||
title="Ver en Otro servidor [{0}]".format(qualities[1]), plot=item.plot,
|
||||
folder=True, fulltitle=item.title, viewmode="movies_with_plot"))
|
||||
|
||||
|
||||
return __sort_by_quality(itemlist)
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ def findvideos(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data1 = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
data_vid = scrapertools.find_single_match(data1, '<div class="videos">(.+?)<\/div><div .+?>')
|
||||
|
||||
# name = scrapertools.find_single_match(data,'<span>Titulo.+?<\/span>([^<]+)<br>')
|
||||
scrapedplot = scrapertools.find_single_match(data, '<br><span>Descrip.+?<\/span>([^<]+)<br>')
|
||||
scrapedthumbnail = scrapertools.find_single_match(data, '<div class="caracteristicas"><img src="([^<]+)">')
|
||||
@@ -143,6 +144,9 @@ def findvideos(item):
|
||||
server = server.strip()
|
||||
if "ok" in server:
|
||||
server = 'okru'
|
||||
if "netu" in server:
|
||||
server = 'netutv (NO DISPONIBLE)'
|
||||
logger.info(url)
|
||||
itemlist.append(
|
||||
item.clone(url=url, action="play", server=server, contentQuality=quality, thumbnail=scrapedthumbnail,
|
||||
plot=scrapedplot, title="Enlace encontrado en %s: [%s ]" % (server.capitalize(), quality)))
|
||||
|
||||
@@ -24,7 +24,7 @@ def mainlist(item):
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="lista_gen", title="Novedades", url=host,
|
||||
thumbnail=thumb_series))
|
||||
itemlist.append(Item(channel=item.channel, action="lista", title="Series", url=urlparse.urljoin(host, "/lista"),
|
||||
itemlist.append(Item(channel=item.channel, action="lista", title="Listado Completo de Series", url=urlparse.urljoin(host, "/lista"),
|
||||
thumbnail=thumb_series))
|
||||
itemlist.append(Item(channel=item.channel, action="categorias", title="Categorias", url=host,
|
||||
thumbnail=thumb_series))
|
||||
@@ -121,7 +121,7 @@ def lista_gen(item):
|
||||
patron = '<article id=.+? class=.+?><div.+?>'
|
||||
patron += '<a href="([^"]+)" title="([^"]+)' # scrapedurl, # scrapedtitle
|
||||
patron += ' Capítulos Completos ([^"]+)">' # scrapedlang
|
||||
patron += '<img.+? data-src=.+? data-lazy-src="([^"]+)"' # scrapedthumbnail
|
||||
patron += '<img src=".+?" data-lazy-src="([^"]+)"' # scrapedthumbnail
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
i = 0
|
||||
for scrapedurl, scrapedtitle, scrapedlang, scrapedthumbnail in matches:
|
||||
@@ -134,13 +134,14 @@ def lista_gen(item):
|
||||
show=scrapedtitle, context=renumbertools.context(item)))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
# Paginacion
|
||||
patron_pag = '<a class="nextpostslink" rel="next" href="([^"]+)">'
|
||||
next_page_url = scrapertools.find_single_match(data, patron_pag)
|
||||
|
||||
if next_page_url != "" and i != 1:
|
||||
item.url = next_page_url
|
||||
itemlist.append(Item(channel=item.channel, action="lista_gen", title=">> Página siguiente", url=next_page_url,
|
||||
thumbnail='https://s32.postimg.org/4zppxf5j9/siguiente.png'))
|
||||
|
||||
#patron_pag='<a class="nextpostslink" rel="next" href="([^"]+)">'
|
||||
patron_pag='<li class="next right"><a href="([^"]+)" >([^"]+)<\/a><\/li>'
|
||||
next_page_url = scrapertools.find_single_match(data,patron_pag)
|
||||
|
||||
if next_page_url!="" and i!=1:
|
||||
item.url=next_page_url[0]
|
||||
itemlist.append(Item(channel = item.channel,action = "lista_gen",title = ">> Página siguiente", url = next_page_url[0], thumbnail='https://s32.postimg.org/4zppxf5j9/siguiente.png'))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -171,7 +172,6 @@ def episodios(item):
|
||||
matches = scrapertools.find_multiple_matches(data, patron_caps)
|
||||
show = scrapertools.find_single_match(data, '<h3><strong>.+?de (.+?)<\/strong>')
|
||||
scrapedplot = scrapertools.find_single_match(data, '<strong>Sinopsis<\/strong><strong>([^"]+)<\/strong><\/pre>')
|
||||
logger.info("epibla " + data)
|
||||
for link, cap, name in matches:
|
||||
if 'x' in cap:
|
||||
title = cap + " - " + name
|
||||
|
||||
Reference in New Issue
Block a user