This commit is contained in:
Alhaziel
2019-07-08 18:52:14 +02:00
parent cc6168afd2
commit 932abb840f
+8 -4
View File
@@ -89,8 +89,9 @@ def menu(item):
def search(item, text): def search(item, text):
support.log(item.url, "search" ,text) support.log(item.url, "search" ,text)
try: try:
item.url = item.url + "/?s=" + text item.url = item.url + "/?s=" + text.replace(' ','+')
return peliculas(item) return peliculas(item)
# Continua la ricerca in caso di errore # Continua la ricerca in caso di errore
@@ -118,8 +119,10 @@ def last(item):
itemlist = [] itemlist = []
infoLabels = {} infoLabels = {}
quality = '' quality = ''
PERPAGE = 20 PERPAGE = 30
page = 1 page = 1
count = 0
if item.page: if item.page:
page = item.page page = item.page
@@ -129,13 +132,14 @@ def last(item):
matches = support.match(item, r'<a href=([^>]+)>([^(:(|[)]+)([^<]+)<\/a>', r'<strong>Ultimi 100 film Aggiornati:<\/a><\/strong>(.*?)<td>', headers)[0] matches = support.match(item, r'<a href=([^>]+)>([^(:(|[)]+)([^<]+)<\/a>', r'<strong>Ultimi 100 film Aggiornati:<\/a><\/strong>(.*?)<td>', headers)[0]
for i, (url, title, info) in enumerate(matches): for i, (url, title, info) in enumerate(matches):
if (page - 1) * PERPAGE > i: continue if (page - 1) * PERPAGE > i - count: continue
if i >= page * PERPAGE: break if i - count >= page * PERPAGE: break
add = True add = True
title = title.rstrip() title = title.rstrip()
if item.contentType == 'tvshow': if item.contentType == 'tvshow':
for i in itemlist: for i in itemlist:
if i.url == url: # togliamo i doppi if i.url == url: # togliamo i doppi
count = count + 1
add = False add = False
else: else:
infoLabels['year'] = scrapertoolsV2.find_single_match(info, r'\(([0-9]+)\)') infoLabels['year'] = scrapertoolsV2.find_single_match(info, r'\(([0-9]+)\)')