KoD 0.6
-Nuova ricerca globale -migliorie prestazionali in generale -fix vari ai server
This commit is contained in:
@@ -165,7 +165,6 @@ def scrapeLang(scraped, lang, longtitle):
|
||||
|
||||
if not language: language = lang
|
||||
if language: longtitle += typo(language, '_ [] color kod')
|
||||
|
||||
return language, longtitle
|
||||
|
||||
def cleantitle(title):
|
||||
@@ -221,8 +220,8 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
||||
if scraped['season']:
|
||||
stagione = scraped['season']
|
||||
episode = scraped['season'] +'x'+ scraped['episode']
|
||||
elif stagione:
|
||||
episode = stagione +'x'+ scraped['episode']
|
||||
elif item.season:
|
||||
episode = item.season +'x'+ scraped['episode']
|
||||
elif item.contentType == 'tvshow' and (scraped['episode'] == '' and scraped['season'] == '' and stagione == ''):
|
||||
item.news = 'season_completed'
|
||||
episode = ''
|
||||
@@ -357,8 +356,6 @@ def scrape(func):
|
||||
search = args['search'] if 'search' in args else ''
|
||||
blacklist = args['blacklist'] if 'blacklist' in args else []
|
||||
data = args['data'] if 'data' in args else ''
|
||||
if not data and item.preloadedData:
|
||||
data = item.preloadedData
|
||||
patron = args['patron'] if 'patron' in args else args['patronMenu'] if 'patronMenu' in args else ''
|
||||
if 'headers' in args:
|
||||
headers = args['headers']
|
||||
@@ -371,6 +368,7 @@ def scrape(func):
|
||||
typeActionDict = args['typeActionDict'] if 'typeActionDict' in args else {}
|
||||
typeContentDict = args['typeContentDict'] if 'typeContentDict' in args else {}
|
||||
debug = args['debug'] if 'debug' in args else False
|
||||
debugBlock = args['debugBlock'] if 'debugBlock' in args else False
|
||||
if 'pagination' in args and inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes']: pagination = args['pagination'] if args['pagination'] else 20
|
||||
else: pagination = ''
|
||||
lang = args['deflang'] if 'deflang' in args else ''
|
||||
@@ -385,9 +383,14 @@ def scrape(func):
|
||||
# replace all ' with " and eliminate newline, so we don't need to worry about
|
||||
|
||||
if patronBlock:
|
||||
if debugBlock:
|
||||
regexDbg(item, patronBlock, headers, data)
|
||||
blocks = scrapertoolsV2.find_multiple_matches_groups(data, patronBlock)
|
||||
block = ""
|
||||
for bl in blocks:
|
||||
# log(len(blocks),bl)
|
||||
if 'season' in bl and bl['season']:
|
||||
item.season = bl['season']
|
||||
blockItemlist, blockMatches = scrapeBlock(item, args, bl['block'], patron, headers, action, pagination, debug,
|
||||
typeContentDict, typeActionDict, blacklist, search, pag, function, lang)
|
||||
for it in blockItemlist:
|
||||
|
||||
Reference in New Issue
Block a user