help with for loop----python 2.7.2

Ian Kelly ian.g.kelly at gmail.com
Sun Mar 23 23:44:41 CET 2014


On Mar 23, 2014 3:56 PM, "tad na" <teddybubu at gmail.com> 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
place. Some sites on the Web suggest that beautiful soup normalizes all
tags to lowercase; try looking for the pubdate tag instead.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140323/0cda58f7/attachment.html>


More information about the Python-list mailing list