=滴滴滴= 发表于 2020-4-7 09:38:09

python 正则表达式 的编写

https://search.51job.com/list/020000,000000,0000,00,9,99,python,2,1.html
在这个网址中怎么能匹配到每个职位名的链接?

编程鱼C 发表于 2020-4-7 13:44:58

没有这个网页

suchocolate 发表于 2020-4-7 14:33:50

xpath('//a[@target="_blank"/@href')

永恒的蓝色梦想 发表于 2020-4-7 15:53:49

from re import findall
#text=网页内容
findall(r'<a target="_blank" title=".{1,20}" href=".{23,70}" onmousedown=".*">',text)
页: [1]
查看完整版本: python 正则表达式 的编写