I'm trying to do extract particular strings in markup and save them (for more complex processing on this line). So say for example, I've read in a line from a file and the current line is:
<center><img border="0" src="http://www.world-of-waterfalls.com/images/Cascades_04_015L.jpg" WIDTH="500" HEIGHT="375" alt="Looking up the Merced River Canyon towards Bridalveil Fall from the Big Oak Flat Road" ***PINIT***></center><br clear="all"><br clear="all">
But I want to store:
tempUrl = 'http://www.world-of-waterfalls.com/images/Cascades_04_015L.jpg'
tempWidth = 500
tempHeight = 375
tempAlt = 'Looking up the Merced River Canyon towards Bridalveil Fall from the Big Oak Flat Road'
How would I go about doing that in Python?
Thanks
HTMLParserorhtml.parserdepending on python version