Couldn't find the answer anywhere. I have an XML:
<channel>
<title>xxx</title>
<description>aaa</description>
<item>
<title>theTitle</title>
<link/>link
</item>
<title>theTitle2</title>
<link/>link
</item>
And I need to extract all the links from that file.
I iterate:
for link in soup.channel.findAll('item'):
links = link.link
linkdict.append(links)
But the output is:
[<link/>, <link/>, <link/>]
How can I parse this xml with/without using regex. I want the code to be as simple as it could be.
UPDATE
I've found the way to do it in one line of code:
soup = bs4.BeautifulSoup(output, features='xml')