From 6053433a5e77786eb7902af5dd8039f7c38da5e0 Mon Sep 17 00:00:00 2001 From: hjCodeCloud <7482185+hjcodecloud@user.noreply.gitee.com> Date: Wed, 23 Jun 2021 14:48:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=A3=81=E7=BA=B8=E6=8A=93?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NO8/index.py | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 NO8/index.py diff --git a/NO8/index.py b/NO8/index.py new file mode 100644 index 0000000..a0b37b5 --- /dev/null +++ b/NO8/index.py @@ -0,0 +1,54 @@ +import requests +import re +import threading + + +headers = { + "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"} + +# 循环获取 URL + + +def get_image(base_url): + + res = requests.get( + url=base_url, headers=headers) + + if res is not None: + html = res.text + + pattern = re.compile( + '