From 509a2569779226ad1b6523d39b70a95d4b760f3d Mon Sep 17 00:00:00 2001 From: pzpalh4w5 <346553037@qq.com> Date: Fri, 31 May 2024 21:39:24 +0800 Subject: [PATCH] ADD file via upload --- 南昌.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 南昌.py diff --git a/南昌.py b/南昌.py new file mode 100644 index 0000000..8324645 --- /dev/null +++ b/南昌.py @@ -0,0 +1,21 @@ +import requests +from bs4 import BeautifulSoup + +url='https://www.ncrczpw.com/index.php?m=jobfair&c=index&a=index' +hea={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0"} + +response = requests.get(url,headers=hea) +# print(response.url) +# print(response.text) +soup = BeautifulSoup(response.text, 'lxml') +re = soup.select('div.td2 a') + +rec = [] +for i in re: + re2 = i.get("href") + if re: + print(re2) + rec.append(re2) +print(len(rec)) + +