|
@@ -44,7 +44,7 @@ class Searchkey:
|
|
|
chlsfile_path = f"./{crawler}/{crawler}_chlsfiles/"
|
|
|
# chlsfile_path = f"../weixinzhishu_chlsfiles/"
|
|
|
# chlsfile_list = []
|
|
|
- if len(chlsfile_path) == 0:
|
|
|
+ if len(os.listdir(chlsfile_path)) == 0:
|
|
|
Common.logger(log_type, crawler).info("chlsfile文件夹为空,等待10s")
|
|
|
cls.start_wechat(log_type, crawler)
|
|
|
time.sleep(10)
|
|
@@ -61,8 +61,8 @@ class Searchkey:
|
|
|
# time.sleep(10)
|
|
|
# cls.get_search_key(log_type, crawler)
|
|
|
else:
|
|
|
- Common.logger(log_type, crawler).info(f"len(chlsfile_path):{len(chlsfile_path)}")
|
|
|
- Common.logger(log_type, crawler).info(f"len(chlsfile):{sorted(os.listdir(chlsfile_path))}")
|
|
|
+ Common.logger(log_type, crawler).info(f"len(chlsfile):{len(os.listdir(chlsfile_path))}")
|
|
|
+ Common.logger(log_type, crawler).info(f"chlsfile_list:{sorted(os.listdir(chlsfile_path))}")
|
|
|
# 获取最新的 chlsfile
|
|
|
chlsfile = sorted(os.listdir(chlsfile_path))[-1]
|
|
|
# 分离文件名与扩展名
|