@@ -11,6 +11,12 @@ from core import scrapertools
|
|||||||
from core import servertools
|
from core import servertools
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
|
from channels import autoplay
|
||||||
|
|
||||||
|
list_servers = ['openload',
|
||||||
|
'directo'
|
||||||
|
]
|
||||||
|
list_quality = ['default']
|
||||||
|
|
||||||
CHANNEL_HOST = "http://animeflv.co"
|
CHANNEL_HOST = "http://animeflv.co"
|
||||||
CHANNEL_DEFAULT_HEADERS = [
|
CHANNEL_DEFAULT_HEADERS = [
|
||||||
@@ -118,6 +124,7 @@ def __find_series(html):
|
|||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
itemlist = list()
|
itemlist = list()
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action="letras",
|
itemlist.append(Item(channel=item.channel, action="letras",
|
||||||
@@ -134,6 +141,7 @@ def mainlist(item):
|
|||||||
url=CHANNEL_HOST + "/Buscar?s="))
|
url=CHANNEL_HOST + "/Buscar?s="))
|
||||||
|
|
||||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||||
|
autoplay.show_option(item.channel, itemlist)
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -179,10 +187,13 @@ def search(item, texto):
|
|||||||
show_list = __find_series(html)
|
show_list = __find_series(html)
|
||||||
|
|
||||||
items = []
|
items = []
|
||||||
|
context = renumbertools.context(item)
|
||||||
|
context2 = autoplay.context
|
||||||
|
context.extend(context2)
|
||||||
for show in show_list:
|
for show in show_list:
|
||||||
title, url, thumbnail, plot = show
|
title, url, thumbnail, plot = show
|
||||||
items.append(Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail,
|
items.append(Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail,
|
||||||
plot=plot, show=title, viewmode="movies_with_plot", context=renumbertools.context(item)))
|
plot=plot, show=title, viewmode="movies_with_plot", context=context))
|
||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
for line in sys.exc_info():
|
for line in sys.exc_info():
|
||||||
@@ -197,10 +208,13 @@ def series(item):
|
|||||||
page_html = get_url_contents(item.url)
|
page_html = get_url_contents(item.url)
|
||||||
show_list = __find_series(page_html)
|
show_list = __find_series(page_html)
|
||||||
items = []
|
items = []
|
||||||
|
context = renumbertools.context(item)
|
||||||
|
context2 = autoplay.context
|
||||||
|
context.extend(context2)
|
||||||
for show in show_list:
|
for show in show_list:
|
||||||
title, url, thumbnail, plot = show
|
title, url, thumbnail, plot = show
|
||||||
items.append(Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail,
|
items.append(Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail,
|
||||||
plot=plot, show=title, viewmode="movies_with_plot", context=renumbertools.context(item)))
|
plot=plot, show=title, viewmode="movies_with_plot", context=context))
|
||||||
|
|
||||||
url_next_page = scrapertools.find_single_match(page_html, REGEX_NEXT_PAGE)
|
url_next_page = scrapertools.find_single_match(page_html, REGEX_NEXT_PAGE)
|
||||||
if url_next_page:
|
if url_next_page:
|
||||||
@@ -292,4 +306,5 @@ def findvideos(item):
|
|||||||
itemlist.append(Item(channel=item.channel, action="play", url=video_url, show=re.escape(item.show),
|
itemlist.append(Item(channel=item.channel, action="play", url=video_url, show=re.escape(item.show),
|
||||||
title="Ver en calidad [%s]" % (qualities[quality_id]), plot=item.plot,
|
title="Ver en calidad [%s]" % (qualities[quality_id]), plot=item.plot,
|
||||||
fulltitle=item.title))
|
fulltitle=item.title))
|
||||||
|
autoplay.start(__sort_by_quality(itemlist), item)
|
||||||
return __sort_by_quality(itemlist)
|
return __sort_by_quality(itemlist)
|
||||||
|
|||||||
Reference in New Issue
Block a user