sample:<a rpos="" cpos="title" href="http://xxx.com/a.html" style="font-family:Arial,SimSun,sans-serif;font-size:16px;color:#0000cc; text-decoration:none;" target="_blank">
我想获取http://xxx.com/a.html 请问如何写正则表达式
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
from bs4 import BeautifulSoup
soup = BeautifulSoup(sample)
url = soup.find('a').get('href')
这还不简单