提交 9bf21537 编写于 作者: H hjdhnx

增加调试

上级 509fe358
......@@ -1048,7 +1048,7 @@ class CMS:
if is_json:
html = self.dealJson(html)
html = json.loads(html)
print(html)
# print(html)
if not is_json and html.find('输入验证码') > -1:
cookie = verifyCode(url,self.headers,self.timeout,self.retry_count,self.ocr_api)
# cookie = ''
......@@ -1063,15 +1063,13 @@ class CMS:
html = r.text
items = pdfa(html,p[0].replace('json:','',1))
print(len(items),items)
# print(len(items),items)
videos = []
for item in items:
# print(item)
try:
# title = pdfh(item, p[1])
print(p[1].split('||'))
title = ''.join([pdfh(item, i) for i in p[1].split('||')])
print(title)
try:
img = pd(item, p[2])
except:
......
......@@ -35,7 +35,7 @@ class jsoup:
# FIXME 暂时不支持jsonpath那样的|| 分割取或属性
if option:
print(f'parse:{parse}=>(option:{option})')
# print(f'parse:{parse}=>(option:{option})')
ret = doc(parse)
# print(html)
# FIXME 解析出来有多个的情况应该自动取第一个
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册