Modify: useless output in debug mode
This commit is contained in:
@@ -131,6 +131,7 @@ class Scraping:
|
||||
pass
|
||||
# if any service return a valid return, break
|
||||
if self.get_data_state(json_data):
|
||||
if self.debug:
|
||||
print(f"[+]Find movie [{name}] metadata on website '{source}'")
|
||||
break
|
||||
except:
|
||||
@@ -165,6 +166,7 @@ class Scraping:
|
||||
# json_data = self.func_mapping[source](number, self)
|
||||
# if any service return a valid return, break
|
||||
if self.get_data_state(json_data):
|
||||
if self.debug:
|
||||
print(f"[+]Find movie [{number}] metadata on website '{source}'")
|
||||
break
|
||||
except:
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
|
||||
"""
|
||||
|
||||
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
import secrets
|
||||
import builtins
|
||||
import config
|
||||
|
||||
from urllib.parse import urljoin
|
||||
from lxml.html import fromstring
|
||||
from multiprocessing.dummy import Pool as ThreadPool
|
||||
@@ -78,6 +79,7 @@ def getStoryline(number, title=None, sites: list=None, uncensored=None, proxies=
|
||||
for site, desc in zip(apply_sites, results):
|
||||
sl = len(desc) if isinstance(desc, str) else 0
|
||||
s += f',[选中{site}字数:{sl}]' if site == sel_site else f',{site}字数:{sl}' if sl else f',{site}:空'
|
||||
if config.getInstance().debug():
|
||||
print(s)
|
||||
return sel
|
||||
|
||||
@@ -100,6 +102,7 @@ def getStoryline_mp(args):
|
||||
storyline = getStoryline_58avgo(number, debug, proxies, verify)
|
||||
if not debug:
|
||||
return storyline
|
||||
if config.getInstance().debug():
|
||||
print("[!]MP 线程[{}]运行{:.3f}秒,结束于{}返回结果: {}".format(
|
||||
site,
|
||||
time.time() - start_time,
|
||||
|
||||
Reference in New Issue
Block a user