Miglioramenti ricerca Mediaset Play e Toon Italia
This commit is contained in:
@@ -155,10 +155,13 @@ def peliculas(item):
|
|||||||
contentType = ''
|
contentType = ''
|
||||||
if item.text:
|
if item.text:
|
||||||
json = []
|
json = []
|
||||||
|
itlist = []
|
||||||
with futures.ThreadPoolExecutor() as executor:
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
for arg in ['searchMovie', 'searchStagioni', 'searchClip']:
|
for arg in ['searchMovie', 'searchStagioni', 'searchClip']:
|
||||||
item.args = ['', 'search', arg]
|
item.args = ['', 'search', arg]
|
||||||
json += executor.submit(get_programs, item).result()
|
itlist += [executor.submit(get_programs, item)]
|
||||||
|
for res in futures.as_completed(itlist):
|
||||||
|
json += res.result()
|
||||||
else:
|
else:
|
||||||
json = get_programs(item)
|
json = get_programs(item)
|
||||||
for it in json:
|
for it in json:
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ def search(item, text):
|
|||||||
# item.args='search'
|
# item.args='search'
|
||||||
item.text = text
|
item.text = text
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
itlist = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# item.url = host + '/lista-serie-tv/'
|
# item.url = host + '/lista-serie-tv/'
|
||||||
@@ -44,7 +45,9 @@ def search(item, text):
|
|||||||
item.url = host + par[0]
|
item.url = host + par[0]
|
||||||
item.contentType = par[1]
|
item.contentType = par[1]
|
||||||
item.args = par[2]
|
item.args = par[2]
|
||||||
itemlist += executor.submit(peliculas, item).result()
|
itlist.append(executor.submit(peliculas, item))
|
||||||
|
for res in futures.as_completed(itlist):
|
||||||
|
itemlist += res.result()
|
||||||
return itemlist
|
return itemlist
|
||||||
# Continua la ricerca in caso di errore
|
# Continua la ricerca in caso di errore
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user