I've got a comma separated list in a table cell in an HTML document, but some of items in the list are linked:
<table>
<tr>
<td>Names</td>
<td>Fred, John, Barry, <a href="http://www.example.com/">Roger</a>, James</td>
</tr>
</table>
I've been using beautiful soup to parse the html, and I can get to the table, but what is the best way to split it and return a data structure roughly like:
[
{'name':'Fred'},
{'name':'John'},
{'name':'Barry'},
{'name':'Roger', 'url':'http://www.example.com/'},
{'name':'James'},
]