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