Fix crash caused by custom site

This commit is contained in:
yoshiko2
2021-07-10 15:01:56 +08:00
parent 80b973ef59
commit 5a80f13bec

View File

@@ -71,7 +71,7 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON
# default fetch order list, from the beginning to the end # default fetch order list, from the beginning to the end
sources = conf.sources().split(',') sources = conf.sources().split(',')
if not len(conf.sources()) > 60:
# if the input file name matches certain rules, # if the input file name matches certain rules,
# move some web service to the beginning of the list # move some web service to the beginning of the list
lo_file_number = file_number.lower() lo_file_number = file_number.lower()
@@ -99,7 +99,7 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON
json_data = {} json_data = {}
if conf.multi_threading(): if conf.multi_threading():
pool = ThreadPool(processes=11) pool = ThreadPool(processes=len(conf.sources().split(',')))
# Set the priority of multi-thread crawling and join the multi-thread queue # Set the priority of multi-thread crawling and join the multi-thread queue
for source in sources: for source in sources: