help with for loop----python 2.7.2

Ben Finney ben+python at benfinney.id.au
Sun Mar 23 18:39:09 EDT 2014


teddybubu at gmail.com writes:

> I am trying to get all the element data from the rss below.

[…]

> from bs4 import BeautifulSoup 
>
> soup = BeautifulSoup(urlopen('http://bl.ocks.org/mbostock.rss'))

RSS is not HTML; so BeautifulSoup is not a good tool to use for parsing
RSS.

Instead, you will do better if you use one of the libraries already
written for RSS parsing <URL:https://wiki.python.org/moin/RssLibraries>.

-- 
 \                                             “To be is to do” —Plato |
  `\                                       “To do is to be” —Aristotle |
_o__)                                        “Do be do be do” —Sinatra |
Ben Finney




More information about the Python-list mailing list