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)) + +