Fix: If cover not found in other source, then skip using other sources using jadb cover
This commit is contained in:
@@ -177,13 +177,17 @@ class Scraping:
|
|||||||
|
|
||||||
# javdb的封面有水印,如果可以用其他源的封面来替换javdb的封面
|
# javdb的封面有水印,如果可以用其他源的封面来替换javdb的封面
|
||||||
if json_data['source'] == 'javdb':
|
if json_data['source'] == 'javdb':
|
||||||
other_sources = sources[sources.index('javdb') + 1:]
|
|
||||||
# search other sources
|
# search other sources
|
||||||
json_data_other = self.searchAdult(number, other_sources)
|
other_sources = sources[sources.index('javdb') + 1:]
|
||||||
if json_data_other is not None:
|
# If cover not found in other source, then skip using other sources using javdb cover
|
||||||
json_data['cover'] = json_data_other['cover']
|
try:
|
||||||
if self.debug:
|
json_data_other = self.searchAdult(number, other_sources)
|
||||||
print(f"[+]Find movie [{number}] cover on website '{json_data_other['cover']}'")
|
if json_data_other is not None:
|
||||||
|
json_data['cover'] = json_data_other['cover']
|
||||||
|
if self.debug:
|
||||||
|
print(f"[+]Find movie [{number}] cover on website '{json_data_other['cover']}'")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# Return if data not found in all sources
|
# Return if data not found in all sources
|
||||||
if not json_data:
|
if not json_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user