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