Arreglos Varios

This commit is contained in:
Daniel Rincón Rodríguez
2017-09-05 19:42:12 -05:00
committed by GitHub
parent eb60c48ed9
commit 4780b08d9f
4 changed files with 55 additions and 22 deletions
+5 -1
View File
@@ -1,4 +1,4 @@
{
{
"id": "animeflv_me",
"name": "Animeflv.ME",
"active": true,
@@ -8,6 +8,10 @@
"banner": "http://i.imgur.com/dTZwCPq.png",
"version": 1,
"changes": [
{
"date": "03/09/2017",
"description": "Añadidos links de openload (No disponible de momento con la videoteca)"
},
{
"date": "15/03/2017",
"description": "limpieza código"
+41 -17
View File
@@ -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}|&nbsp;", "", 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)
+5 -4
View File
@@ -1,4 +1,4 @@
{
{
"id": "anitoonstv",
"name": "AniToons TV",
"active": true,
@@ -9,8 +9,8 @@
"version": 1,
"changes": [
{
"date": "13/06/2017",
"description": "Arreglado problema en nombre de servidores"
"date": "03/09/2017",
"description": "Arreglado problema en nombre de servidores (nuevamente), añadido a anime"
},
{
"date": "02/06/2017",
@@ -19,6 +19,7 @@
],
"categories": [
"tvshow",
"latino"
"latino",
"anime"
]
}
+4
View File
@@ -132,6 +132,7 @@ def findvideos(item):
data = httptools.downloadpage(item.url).data
data1 = re.sub(r"\n|\r|\t|\s{2}|&nbsp;", "", 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)))