zl程序教程

您现在的位置是:首页 >  后端

当前栏目

python通过正则获取网页上的全部链接详解编程语言

Python网页链接编程语言 详解 获取 通过 正则
2023-06-13 09:20:23 时间
import re, urllib 

htmlSource = urllib.urlopen("http://www.sharejs.com").read(200000) 

linksList = re.findall( a href=(.*?) .*? /a ,htmlSource) 

for link in linksList: 

 print link

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/8027.html

cjava