解决Github登录出现两个authenticity_token问题

This commit is contained in:
Jing Ling
2020-02-10 18:34:38 +08:00
parent 46521a8170
commit 463325e694
+2 -3
View File
@@ -62,11 +62,10 @@ class Github(Search):
return None return None
if resp.status_code != 200: if resp.status_code != 200:
return None return None
match = re.search( match = re.findall(r'name="authenticity_token" value="(.*?)"', resp.text)
r'name="authenticity_token" value="(.*?)"', resp.text)
if not match: if not match:
return None return None
return match.group(1) return match[1]
def search(self, full_search=False): def search(self, full_search=False):
""" """