Fix Episodi StreamingCommunity
This commit is contained in:
@@ -46,7 +46,7 @@ def mainlist(item):
|
|||||||
|
|
||||||
def genres(item):
|
def genres(item):
|
||||||
getHeaders()
|
getHeaders()
|
||||||
support.info()
|
logger.debug()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = support.scrapertools.decodeHtmlentities(support.match(item).data)
|
data = support.scrapertools.decodeHtmlentities(support.match(item).data)
|
||||||
args = support.match(data, patronBlock=r'genre-options-json="([^\]]+)\]', patron=r'name"\s*:\s*"([^"]+)').matches
|
args = support.match(data, patronBlock=r'genre-options-json="([^\]]+)\]', patron=r'name"\s*:\s*"([^"]+)').matches
|
||||||
@@ -57,7 +57,7 @@ def genres(item):
|
|||||||
|
|
||||||
|
|
||||||
def search(item, text):
|
def search(item, text):
|
||||||
support.info('search', item)
|
logger.debug('search', item)
|
||||||
item.search = text
|
item.search = text
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -66,12 +66,12 @@ def search(item, text):
|
|||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
for line in sys.exc_info():
|
for line in sys.exc_info():
|
||||||
support.info('search log:', line)
|
logger.error(line)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
def newest(category):
|
def newest(category):
|
||||||
support.info(category)
|
logger.debug(category)
|
||||||
itemlist = []
|
itemlist = []
|
||||||
item = support.Item()
|
item = support.Item()
|
||||||
item.args = 1
|
item.args = 1
|
||||||
@@ -89,7 +89,7 @@ def newest(category):
|
|||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
for line in sys.exc_info():
|
for line in sys.exc_info():
|
||||||
support.info(line)
|
logger.error(line)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
@@ -98,7 +98,7 @@ def newest(category):
|
|||||||
|
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
getHeaders()
|
getHeaders()
|
||||||
support.info()
|
logger.debug()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
videoType = 'movie' if item.contentType == 'movie' else 'tv'
|
videoType = 'movie' if item.contentType == 'movie' else 'tv'
|
||||||
|
|
||||||
@@ -121,16 +121,13 @@ def peliculas(item):
|
|||||||
js += record
|
js += record
|
||||||
else:
|
else:
|
||||||
js = records
|
js = records
|
||||||
# support.dbg()
|
|
||||||
with futures.ThreadPoolExecutor() as executor:
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
itlist = [executor.submit(makeItem, i, it, item) for i, it in enumerate(js)]
|
itlist = [executor.submit(makeItem, i, it, item) for i, it in enumerate(js)]
|
||||||
for res in futures.as_completed(itlist):
|
for res in futures.as_completed(itlist):
|
||||||
itemlist.append(res.result())
|
itemlist.append(res.result())
|
||||||
# for i, it in enumerate(js):
|
|
||||||
# itm = makeItem(i, it, item)
|
|
||||||
# itemlist.append(itm)
|
|
||||||
|
|
||||||
itemlist.sort(key=lambda item: item.n, reverse = True)
|
itemlist.sort(key=lambda item: item.n)
|
||||||
|
|
||||||
if len(itemlist) >= 60:
|
if len(itemlist) >= 60:
|
||||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page + 1))
|
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page + 1))
|
||||||
@@ -166,22 +163,21 @@ def makeItem(n, it, item):
|
|||||||
|
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
getHeaders()
|
getHeaders()
|
||||||
support.info()
|
logger.debug()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
js = json.loads(support.match(item.url, patron=r'seasons="([^"]+)').match.replace('"','"'))
|
js = json.loads(support.match(item.url, patron=r'seasons="([^"]+)').match.replace('"','"'))
|
||||||
support.info(js)
|
logger.debug(js)
|
||||||
|
|
||||||
for episodes in js:
|
for episodes in js:
|
||||||
for it in episodes['episodes']:
|
for it in episodes['episodes']:
|
||||||
support.info(it)
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
support.Item(channel=item.channel,
|
support.Item(channel=item.channel,
|
||||||
title=support.typo(str(episodes['number']) + 'x' + str(it['number']).zfill(2) + ' - ' + it['name'], 'bold'),
|
title=support.typo(str(episodes['number']) + 'x' + str(it['number']).zfill(2) + ' - ' + it['name'], 'bold'),
|
||||||
episode = it['number'],
|
episode = it['number'],
|
||||||
season=episodes['number'],
|
season=episodes['number'],
|
||||||
thumbnail='https://image.tmdb.org/t/p/w1280' + it['images'][0]['url'],
|
thumbnail=item.thumbnail,
|
||||||
fanart='https://image.tmdb.org/t/p/w1280' + it['images'][0]['url'],
|
fanart=item.fanart,
|
||||||
plot=it['plot'],
|
plot=it['plot'],
|
||||||
action='findvideos',
|
action='findvideos',
|
||||||
contentType='episode',
|
contentType='episode',
|
||||||
@@ -195,7 +191,7 @@ def episodios(item):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
getHeaders()
|
getHeaders()
|
||||||
support.info()
|
logger.debug()
|
||||||
itemlist=[]
|
itemlist=[]
|
||||||
url = support.match(support.match(item).data.replace('"','"').replace('\\',''), patron=r'video_url"\s*:\s*"([^"]+)"').match
|
url = support.match(support.match(item).data.replace('"','"').replace('\\',''), patron=r'video_url"\s*:\s*"([^"]+)"').match
|
||||||
for res in ['480p', '720p', '1080p']:
|
for res in ['480p', '720p', '1080p']:
|
||||||
|
|||||||
Reference in New Issue
Block a user