From d50bb5b8bd43040dc50f16cad90b369430e01f66 Mon Sep 17 00:00:00 2001 From: pw4izm9rs <2764851313@qq.com> Date: Wed, 18 Sep 2024 21:28:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=84=E5=8A=A0=E9=A2=981=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=96=87=E4=BB=B61?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- get_aoyun.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 get_aoyun.py diff --git a/get_aoyun.py b/get_aoyun.py new file mode 100644 index 0000000..6d6a678 --- /dev/null +++ b/get_aoyun.py @@ -0,0 +1,21 @@ +import requests +import re + +header = {"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0"} + +url = "http://sports.news.cn/olympicparis2024/index.html" +response = requests.get(url=url, headers=header) +response.encoding = 'utf-8' +data = response.text + +list1 = re.findall("blank'>(.*?)",data) +list2 = re.findall('