我正在使用 LastFM API 来获取艺术家信息。当我调用他们的artist.getInfo
方法时,我得到了一个 Artist 对象。但是,wiki 摘要文本使用 html 格式,如下所示:
Arch Enemy is a Swedish <a href="http://www.last.fm/tag/melodic%20death%20metal" class="bbcode_tag" rel="tag">melodic death metal</a> band from Halmstad, Sweden, formed in 1996. Founded by <a href="http://www.last.fm/music/Carcass" class="bbcode_artist">Carcass</a> guitarist <a href="http://www.last.fm/music/Michael+Amott" class="bbcode_artist">Michael Amott</a> along with <a href="http://www.last.fm/music/Johan+Liiva" class="bbcode_artist">Johan Liiva</a>, both originally from the influential death metal band <a href="http://www.last.fm/music/Carnage" class="bbcode_artist">Carnage</a>. The band has released seven studio albums, a live album (Burning Japan Live 1999), two DVDs and three EPs. The band was originally fronted by Johan Liiva, who was replaced by <a href="http://www.last.fm/music/Angela+Gossow" class="bbcode_artist">Angela Gossow</a> as lead vocalist in 2000
我想从此文本中获取纯文本(无 html)。我尝试使用子字符串手动删除它们,但我找不到这样做的方法。