正則表達式用Python從HTML中的href屬性中提取URL 考慮如下字符串:string = "<p>Hello World</p><a href="http://example.com">More Examples</a><a href="http://example2.com">Even More Examples</a>"我怎么能用Python在錨標記的href中提取網址?就像是:>>> url = getURLs(string)>>> url['http://example.com', 'http://example2.com']謝謝!
添加回答
舉報
0/150
提交
取消