CodePudding user response:
Such a simple site don't use the selenium, can get this done in a simple requests, don't even need headersimport requests
The from LXML import etree
Url='https://zhaosheng.upc.edu.cn/static/front/upc/basic/html_web/lnfs.html'
The response=requests. Get (url)
Data=https://bbs.csdn.net/topics/etree.HTML (the response text)
City=data. Xpath ('//dd [@ data - param="the SSMC"]//a/text () ')
For c in city:
Print (c)
CodePudding user response:
Big misunderstanding, I'm not just want to climb the province name, I want to click each provinces, then got take corresponding data, was climbing provinces stuck now, how to solve