提交 0347a717 编写于 作者: H hjdhnx

增加解析

上级 77aa6978
...@@ -77,13 +77,16 @@ def jxTxt2Json(text:str): ...@@ -77,13 +77,16 @@ def jxTxt2Json(text:str):
for i in data: for i in data:
i = i.strip() i = i.strip()
dt = i.split(',') dt = i.split(',')
if not i.startswith('#'): if not i.startswith('#') and len(i) > 10:
jxs.append({ try:
'name':dt[0], jxs.append({
'url':dt[1], 'name':dt[0],
'type':dt[2] if len(dt) > 2 else 0, 'url':dt[1],
'ua':dt[3] if len(dt) > 3 else UA, 'type':dt[2] if len(dt) > 2 else 0,
}) 'ua':dt[3] if len(dt) > 3 else UA,
})
except Exception as e:
logger.info(f'解析行有错误:{e}')
return jxs return jxs
def getJxs(path='js'): def getJxs(path='js'):
......
3.6.1 3.6.3
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册