Archived
1
0
Fork 0

Update wikilib.py

This commit is contained in:
yzhh 2020-06-19 23:15:50 +08:00
parent ab646f3f07
commit f760d1cb69

View file

@ -32,7 +32,7 @@ def Wiki(path1,pagename):
loadtext = json.loads(gettext.text)
v = loadtext['query']['pages'][y]['extract']
try:
s = re.match(r'.*(\#.*)',str1)
s = re.match(r'.*(\#.*)',pagename)
z = x[y]['fullurl'] + urllib.parse.quote(s.group(1).encode('UTF-8'))
except Exception:
z = x[y]['fullurl']
@ -40,7 +40,7 @@ def Wiki(path1,pagename):
return('您要的' + pagename + "" +xx)
except Exception:
try:
s = re.match(r'.*(\#.*)',str1)
s = re.match(r'.*(\#.*)',pagename)
z = x[y]['fullurl'] + urllib.parse.quote(s.group(1).encode('UTF-8'))
except Exception:
z = x[y]['fullurl']