替换封面

This commit is contained in:
Marks
2022-11-25 20:16:57 -08:00
parent f5db0bc2f0
commit ab7eea1e02

View File

@@ -179,13 +179,17 @@ class Scraping:
if 'source' in json_data and json_data['source'] == 'javdb': if 'source' in json_data and json_data['source'] == 'javdb':
# search other sources # search other sources
other_sources = sources[sources.index('javdb') + 1:] other_sources = sources[sources.index('javdb') + 1:]
# If cover not found in other source, then skip using other sources using javdb cover while other_sources:
# If cover not found in other source, then skip using other sources using javdb cover instead
try: try:
json_data_other = self.searchAdult(number, other_sources) json_data_other = self.searchAdult(number, other_sources)
if json_data_other is not None: if json_data_other is not None and json_data_other['cover'] != '':
json_data['cover'] = json_data_other['cover'] json_data['cover'] = json_data_other['cover']
if self.debug: if self.debug:
print(f"[+]Find movie [{number}] cover on website '{json_data_other['cover']}'") print(f"[+]Find movie [{number}] cover on website '{json_data_other['cover']}'")
break
# check other sources
other_sources = sources[sources.index(json_data_other['source']) + 1:]
except: except:
pass pass