Home  >  Article  >  Web Front-end  >  How to quickly find links in html

How to quickly find links in html

醉折花枝作酒筹
醉折花枝作酒筹forward
2021-04-25 18:21:445216browse

This article introduces a way to quickly find links in HTML. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

How to quickly find links in html

def getUrlList(html_str):
	
	pattern = r&#39;<a href="(https.*?/[0-9]{9})".*&#39;
	url_list = re.findall(pattern,html_str)
	return list(set(url_list))

Recommended learning: html video tutorial

The above is the detailed content of How to quickly find links in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete