On Mar 23, 2014 3:56 PM, "tad na" wrote:
>
> This is the error I get with
> 1. print data[x].pubDate.text
> AttributeError: 'NoneType' object has no attribute 'text'
> 2. print data[x].pubDate
> It results in "None"
So the problem is that it's not even finding the pubDate tag in the first
teddyb...@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
On Sunday, March 23, 2014 12:49:11 PM UTC-5, Ian wrote:
> On Mar 23, 2014 11:31 AM, "tad na" wrote:
> > OK . second problem :)
> > I can print the date. not sure how to do this one..
> Why not? What happens when you try?
> > try:
> > from urllib2 import urlopen
> > except ImportError:
> >
On 23/03/2014 17:30, tad na wrote:
On Sunday, March 23, 2014 12:29:40 PM UTC-5, tad na wrote:
On Saturday, March 22, 2014 6:21:30 AM UTC-5, tad na wrote:
I am trying to get all the element data from the rss below.
The only thing I am pulling is the first element.
I don't understand
On Sunday, March 23, 2014 12:40:04 PM UTC-5, Mark Lawrence wrote:
> On 23/03/2014 17:30, tad na wrote:
> Would you please use the mailing list
> https://mail.python.org/mailman/listinfo/python-list or read and action
> this https://wiki.python.org/moin/GoogleGroupsPython to prevent us
> seeing d
On Mar 23, 2014 11:31 AM, "tad na" wrote:
> OK . second problem :)
> I can print the date. not sure how to do this one..
Why not? What happens when you try?
> try:
> from urllib2 import urlopen
> except ImportError:
> from urllib.request import urlopen
> import urllib2
> from bs4 import
On 23/03/2014 17:30, tad na wrote:
Would you please use the mailing list
https://mail.python.org/mailman/listinfo/python-list or read and action
this https://wiki.python.org/moin/GoogleGroupsPython to prevent us
seeing double line spacing and single line paragraphs, thanks.
--
My fellow Pyth
On Sunday, March 23, 2014 12:29:40 PM UTC-5, tad na wrote:
> On Saturday, March 22, 2014 6:21:30 AM UTC-5, tad na wrote:
>
> > I am trying to get all the element data from the rss below.
>
> >
>
> > The only thing I am pulling is the first element.
>
>
>
> > I don't understand why the for l
On Saturday, March 22, 2014 6:21:30 AM UTC-5, tad na wrote:
> I am trying to get all the element data from the rss below.
>
> The only thing I am pulling is the first element.
> I don't understand why the for loop does not go through the entire rss.
> Here is my code
> try:
> from urlli
On Sat, Mar 22, 2014 at 5:21 AM, wrote:
> I am trying to get all the element data from the rss below.
> The only thing I am pulling is the first element.
> I don't understand why the for loop does not go through the entire rss.
> Here is my code
[SNIP]
> for item in soup.find_all('item'):
>
10 matches
Mail list logo