From f24c0da890f8b3e13a48d7afb94ee852fcb78454 Mon Sep 17 00:00:00 2001 From: fanza1 <60313219+fanza1@users.noreply.github.com> Date: Sat, 3 Apr 2021 17:16:00 +0800 Subject: [PATCH] fix bug for cfscrape --- javsdt/Functions/Requests/JavlibraryReq.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/javsdt/Functions/Requests/JavlibraryReq.py b/javsdt/Functions/Requests/JavlibraryReq.py index 58d8cee9..58811a0a 100644 --- a/javsdt/Functions/Requests/JavlibraryReq.py +++ b/javsdt/Functions/Requests/JavlibraryReq.py @@ -35,8 +35,10 @@ def get_library_html(url, proxy): scraper = cfscrape.create_scraper() web_data = scraper.get(url).text #print(web_data) - return web_data - continue + if re.search(r'JAVLibrary', web_data): + return web_data + else: + continue print('>>请检查你的网络环境是否可以打开:', url) os.system('pause')