Home > Article > Web Front-end > How to quickly find links in html
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.
def getUrlList(html_str): pattern = r'<a href="(https.*?/[0-9]{9})".*' 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!