some fix
This commit is contained in:
Executable → Regular
+33
-54
@@ -201,9 +201,8 @@ def peliculas(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
|
patron = '<div class="home_post_cont.*? post_box">.*?<a href="(.*?)".*?'
|
||||||
patron = '<div class="home_post_cont.*? post_box">.*?<a href="([^"]+)".*?src="([^"]+)".*?title="(.*?) \((' \
|
patron += 'src="(.*?)".*?title="(.*?) \((.*?)\).*?".*?p>(.*?)<'
|
||||||
'.*?)\)".*?p>([^&]+)<'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear, scrapedplot in matches:
|
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear, scrapedplot in matches:
|
||||||
@@ -283,65 +282,45 @@ def findvideos(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
duplicados = []
|
duplicados = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
|
patron = 'target="_blank".*? service=".*?" data="(.*?)"><li>(.*?)<\/li>'
|
||||||
patron = 'dec\("([^"]+)"\)\+dec\("([^"]+)"\)'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
recomendados = ["uptobox", "thevideos", "nowvideo", "pcloud", "directo"]
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
|
||||||
|
|
||||||
if dec(scrapedurl) in servidor:
|
server_url = {'YourUpload':'https://www.yourupload.com/embed/',
|
||||||
server = servidor[dec(scrapedurl)]
|
'Openload':'https://openload.co/embed/',
|
||||||
title = "Ver " + item.contentTitle + " en " + servidor[dec(scrapedurl)].upper()
|
'TVM':'https://thevideo.me/embed-',
|
||||||
if 'yourupload' in dec(scrapedurl):
|
'Trailer':'',
|
||||||
url = dec(scrapedurl).replace('watch', 'embed') + dec(scrapedtitle)
|
'BitTorrent':'',
|
||||||
elif 'gdredirect' in dec(scrapedurl):
|
'Mega':'',
|
||||||
url = ''
|
'MediaFire':''}
|
||||||
url_list = []
|
|
||||||
url_list += get_urls(item, dec(scrapedtitle))
|
|
||||||
|
|
||||||
for video in url_list:
|
for video_cod, server_id in matches:
|
||||||
new_title = title + ' (' + video['label'] + ')'
|
if server_id not in ['BitTorrent', 'Mega', 'MediaFire', 'Trailer','']:
|
||||||
itemlist.append(
|
video_id = dec(video_cod)
|
||||||
Item(channel=item.channel,
|
|
||||||
action="play",
|
if server_id in server_url:
|
||||||
title=new_title,
|
server = server_id.lower()
|
||||||
fulltitle=item.title,
|
thumbnail = servertools.guess_server_thumbnail(server_id)
|
||||||
url=video['file'],
|
if server_id == 'TVM':
|
||||||
language=IDIOMAS[item.language],
|
server = 'thevideo.me'
|
||||||
thumbnail=item.thumbnail,
|
url= server_url[server_id]+video_id+'.html'
|
||||||
plot=item.plot,
|
|
||||||
quality=video['label'],
|
|
||||||
server='directo'
|
|
||||||
))
|
|
||||||
duplicados.append(title)
|
|
||||||
else:
|
else:
|
||||||
|
url = server_url[server_id]+video_id
|
||||||
|
title = item.contentTitle +' (%s)'%server
|
||||||
|
quality = 'default'
|
||||||
|
|
||||||
if 'youtube' in dec(scrapedurl):
|
|
||||||
title = '[COLOR orange]Trailer en Youtube[/COLOR]'
|
|
||||||
url = dec(scrapedurl) + dec(scrapedtitle)
|
|
||||||
|
|
||||||
if (servidor[dec(scrapedurl)]) in recomendados:
|
if server_id not in ['BitTorrent', 'Mega', 'MediaFire', 'Trailer']:
|
||||||
title = title + "[COLOR limegreen] [I] (Recomedado) [/I] [/COLOR]"
|
if url not in duplicados:
|
||||||
thumbnail = servertools.guess_server_thumbnail(servidor[dec(scrapedurl)])
|
itemlist.append(item.clone(action = 'play',
|
||||||
plot = ""
|
|
||||||
if title not in duplicados and url != '':
|
|
||||||
new_item = Item(channel=item.channel,
|
|
||||||
action="play",
|
|
||||||
title=title,
|
title=title,
|
||||||
fulltitle=item.title,
|
fulltitle=item.contentTitle,
|
||||||
url=url,
|
url=url,
|
||||||
thumbnail=thumbnail,
|
|
||||||
plot=item.plot,
|
|
||||||
extra=item.thumbnail,
|
|
||||||
language=IDIOMAS[item.language],
|
language=IDIOMAS[item.language],
|
||||||
quality='default',
|
thumbnail = thumbnail,
|
||||||
server=server.lower()
|
quality=quality,
|
||||||
)
|
server = server
|
||||||
if 'Trailer' in new_item.title:
|
))
|
||||||
trailer_item = new_item
|
duplicados.append(url)
|
||||||
else:
|
|
||||||
itemlist.append(new_item)
|
|
||||||
duplicados.append(title)
|
|
||||||
|
|
||||||
# Requerido para FilterTools
|
# Requerido para FilterTools
|
||||||
|
|
||||||
@@ -351,7 +330,7 @@ def findvideos(item):
|
|||||||
|
|
||||||
autoplay.start(itemlist, item)
|
autoplay.start(itemlist, item)
|
||||||
|
|
||||||
itemlist.append(trailer_item)
|
#itemlist.append(trailer_item)
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
|
|||||||
Reference in New Issue
Block a user