From 463325e69407063d39b9ca491d899855f5f0a05d Mon Sep 17 00:00:00 2001 From: Jing Ling Date: Mon, 10 Feb 2020 18:34:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3Github=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E4=B8=A4=E4=B8=AAauthenticity=5Ftoken?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oneforall/modules/search/github.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/oneforall/modules/search/github.py b/oneforall/modules/search/github.py index 0754b9b..62fae72 100644 --- a/oneforall/modules/search/github.py +++ b/oneforall/modules/search/github.py @@ -62,11 +62,10 @@ class Github(Search): return None if resp.status_code != 200: return None - match = re.search( - r'name="authenticity_token" value="(.*?)"', resp.text) + match = re.findall(r'name="authenticity_token" value="(.*?)"', resp.text) if not match: return None - return match.group(1) + return match[1] def search(self, full_search=False): """