@@ -16,7 +16,7 @@ from core.item import Item
|
|||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
from channelselector import get_thumb
|
from channelselector import get_thumb
|
||||||
|
|
||||||
host = 'https://www2.doramasmp4.com/'
|
host = 'https://www3.doramasmp4.com/'
|
||||||
|
|
||||||
IDIOMAS = {'sub': 'VOSE', 'VO': 'VO'}
|
IDIOMAS = {'sub': 'VOSE', 'VO': 'VO'}
|
||||||
list_language = IDIOMAS.values()
|
list_language = IDIOMAS.values()
|
||||||
@@ -191,7 +191,7 @@ def findvideos(item):
|
|||||||
video_data = httptools.downloadpage(video_url, headers=headers).data
|
video_data = httptools.downloadpage(video_url, headers=headers).data
|
||||||
url = scrapertools.find_single_match(video_data, "'file':'([^']+)'")
|
url = scrapertools.find_single_match(video_data, "'file':'([^']+)'")
|
||||||
else:
|
else:
|
||||||
video_url = 'https://www2.doramasmp4.com/api/redirect.php?token=%s' % token
|
video_url = 'https://www3.doramasmp4.com/api/redirect.php?token=%s' % token
|
||||||
video_data = httptools.downloadpage(video_url, headers=headers, follow_redirects=False).headers
|
video_data = httptools.downloadpage(video_url, headers=headers, follow_redirects=False).headers
|
||||||
url = scrapertools.find_single_match(video_data['location'], '\d+@@@(.*?)@@@')
|
url = scrapertools.find_single_match(video_data['location'], '\d+@@@(.*?)@@@')
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ def seasons(item):
|
|||||||
itemlist=[]
|
itemlist=[]
|
||||||
|
|
||||||
data=get_source(item.url)
|
data=get_source(item.url)
|
||||||
patron='data-toggle="tab">TEMPORADA.?(\d+)</a>'
|
patron='data-toggle="tab">TEMPORADA\s?(\d+)</a>'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
infoLabels = item.infoLabels
|
infoLabels = item.infoLabels
|
||||||
|
|||||||
@@ -216,9 +216,11 @@ def play(item):
|
|||||||
logger.info("play: %s" % item.url)
|
logger.info("play: %s" % item.url)
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
item.url = scrapertools.find_single_match(data, "location.href='([^']+)")
|
new_url = scrapertools.find_single_match(data, "location.href='([^']+)")
|
||||||
item.server = ""
|
if new_url != '':
|
||||||
|
item.url = new_url
|
||||||
itemlist.append(item.clone())
|
itemlist.append(item.clone())
|
||||||
itemlist = servertools.get_servers_itemlist(itemlist)
|
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||||
itemlist[0].thumbnail=item.contentThumbnail
|
itemlist[0].thumbnail=item.contentThumbnail
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|||||||
@@ -86,8 +86,7 @@ def sub_menu(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
url = host + '/%s/es/' % item.type
|
url = host + '/%s/es/ajax/1/' % item.type
|
||||||
search_url = host + '/search/'
|
|
||||||
link_type = item.title.lower()
|
link_type = item.title.lower()
|
||||||
if link_type == 'streaming':
|
if link_type == 'streaming':
|
||||||
link_type = 'flash'
|
link_type = 'flash'
|
||||||
@@ -119,8 +118,8 @@ def sub_menu(item):
|
|||||||
url=url + '?q=%s+subtitulado' % link_type, action='list_all',
|
url=url + '?q=%s+subtitulado' % link_type, action='list_all',
|
||||||
thumbnail=get_thumb('vose', auto=True), type=item.type, send_lang='VOSE',
|
thumbnail=get_thumb('vose', auto=True), type=item.type, send_lang='VOSE',
|
||||||
link_type=link_type))
|
link_type=link_type))
|
||||||
itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=search_url + '?q=',
|
itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=url + '?q=',
|
||||||
thumbnail=get_thumb("search", auto=True), type='search', link_type=link_type))
|
thumbnail=get_thumb("search", auto=True), type=item.type, link_type=link_type))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -145,7 +144,7 @@ def section(item):
|
|||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
title = scrapedtitle
|
title = scrapedtitle
|
||||||
url = host+scrapedurl
|
url = host+scrapedurl.replace('/?','/ajax/1/?')
|
||||||
if (item.title=='Generos' and title.lower() not in excluded and not title.isdigit()) or (item.title=='Por Año' and title.isdigit()):
|
if (item.title=='Generos' and title.lower() not in excluded and not title.isdigit()) or (item.title=='Por Año' and title.isdigit()):
|
||||||
itemlist.append(Item(channel=item.channel, url=url, title=title, action='list_all', type=item.type))
|
itemlist.append(Item(channel=item.channel, url=url, title=title, action='list_all', type=item.type))
|
||||||
|
|
||||||
@@ -159,8 +158,11 @@ def list_all(item):
|
|||||||
listed =[]
|
listed =[]
|
||||||
quality=''
|
quality=''
|
||||||
infoLabels = {}
|
infoLabels = {}
|
||||||
data= get_source(item.url, referer='%s/%s/es/' %(host, item.type))
|
json_data= jsontools.load(get_source(item.url))
|
||||||
|
data = json_data['render']
|
||||||
|
data = re.sub(r'\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||||
|
|
||||||
|
#if item.type == 'peliculas':
|
||||||
patron = '<img class="cover".*?src="([^"]+)" data-id="\d+" '
|
patron = '<img class="cover".*?src="([^"]+)" data-id="\d+" '
|
||||||
patron +='alt="Ver ([^\(]+)(.*?)">'
|
patron +='alt="Ver ([^\(]+)(.*?)">'
|
||||||
patron += '<div class="mdl-card__menu"><a class="clean-link" href="([^"]+)">'
|
patron += '<div class="mdl-card__menu"><a class="clean-link" href="([^"]+)">'
|
||||||
@@ -222,7 +224,7 @@ def list_all(item):
|
|||||||
infoLabels = infoLabels
|
infoLabels = infoLabels
|
||||||
)
|
)
|
||||||
|
|
||||||
if item.type == 'peliculas' or item.type == 'all' or item.type == 'search':
|
if item.type == 'peliculas' or item.type == 'all':
|
||||||
new_item.contentTitle = scrapedtitle
|
new_item.contentTitle = scrapedtitle
|
||||||
else:
|
else:
|
||||||
scrapedtitle = scrapedtitle.split(' - ')
|
scrapedtitle = scrapedtitle.split(' - ')
|
||||||
@@ -235,12 +237,12 @@ def list_all(item):
|
|||||||
itemlist.sort(key=lambda it: it.title)
|
itemlist.sort(key=lambda it: it.title)
|
||||||
# Paginación
|
# Paginación
|
||||||
|
|
||||||
# if json_data['next']:
|
if json_data['next']:
|
||||||
# actual_page = scrapertools.find_single_match(item.url, 'ajax/(\d+)/')
|
actual_page = scrapertools.find_single_match(item.url, 'ajax/(\d+)/')
|
||||||
# next_page =int(actual_page) + 1
|
next_page =int(actual_page) + 1
|
||||||
# url_next_page = item.url.replace('ajax/%s' % actual_page, 'ajax/%s' % next_page)
|
url_next_page = item.url.replace('ajax/%s' % actual_page, 'ajax/%s' % next_page)
|
||||||
# itemlist.append(item.clone(title="Siguiente >>", url=url_next_page, type=item.type,
|
itemlist.append(item.clone(title="Siguiente >>", url=url_next_page, type=item.type,
|
||||||
# action='list_all', send_lang=item.send_lang))
|
action='list_all', send_lang=item.send_lang))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user