This commit is contained in:
恍兮惚兮 2024-05-18 01:55:02 +08:00
parent f9563995a1
commit 7ad0956e6e
4 changed files with 22 additions and 21 deletions

View File

@ -30,8 +30,7 @@ class cishubase:
except:
self.needinit = True
if res is None or res == "":
return
if res and len(res):
self.callback(res)
except:
pass

View File

@ -17,7 +17,7 @@ class goo(cishubase):
xx = re.sub("<a([\\s\\S]*?)>", "", xx)
xx = re.sub("</a>", "", xx)
if len(xx):
return (
'<div style="text-align: center;"><a target="_blank" href="{}">link</a></div>'.format(
url

View File

@ -25,7 +25,7 @@ class weblio(cishubase):
_all.append(xx)
join = "<br>".join(_all)
if len(join):
return (
'<div style="text-align: center;"><a target="_blank" href="{}">link</a></div>'.format(
url

View File

@ -25,6 +25,8 @@ class youdao(cishubase):
proxies=getproxy(),
).text
fnd = re.findall('<section class="modules"(.*?)>([\\s\\S]*?)</section>', text)
if len(fnd[0][1]):
return (
'<div style="text-align: center;"><a target="_blank" href="{}">link</a></div><br>'.format(
"https://dict.youdao.com/result?word={}&lang={}".format(