mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
优化冗余代码
This commit is contained in:
@@ -237,7 +237,7 @@ def do_update(request):
|
||||
print('开始拉取更新')
|
||||
# print(os.system('cat ./update.sh'))
|
||||
subprocess.Popen('chmod +x ./update.sh', shell=True)
|
||||
p = subprocess.Popen('./update.sh', shell=True, stdout=subprocess.PIPE, bufsize=1)
|
||||
p = subprocess.Popen('./update.sh', shell=True, stdout=subprocess.PIPE)
|
||||
p.wait()
|
||||
out = p.stdout.readlines()
|
||||
for i in out:
|
||||
|
||||
@@ -247,7 +247,7 @@ class PtSpider:
|
||||
})
|
||||
return CommonResponse.success(data=cookies)
|
||||
except Exception as e:
|
||||
raise
|
||||
# raise
|
||||
return CommonResponse.error(msg='Cookies解析失败,请确认导入了正确的cookies备份文件!')
|
||||
|
||||
def parse_cookie_expire(self, datas):
|
||||
|
||||
Reference in New Issue
Block a user