On Thursday, March 6, 2014 2:58:12 PM UTC-6, John Gordon wrote: > In <e73d29eb-17bb-472e-bdc4-c38ca904c...@googlegroups.com> teddy writes: > > > > > <span class="date">October 22, 2011</span> > > > > > date1 = soup.span.text > > > data=soup.find_all(date="value") > > > > Try this: > > > > soup.find_all(name="span", class="date") > > > > -- > > John Gordon Imagine what it must be like for a real medical doctor to > > watch 'House', or a real serial killer to watch 'Dexter'.
I have python 2.7.2 and it does not like class in the code you provided. Now when I take out [ class="date"], this is returned: [<span class="date">March 5, 2014</span>, <span class="date">March 5, 2014</span>] This is the code I am using: "data = soup.find_all(name="span") print (data)" 1. it returns today's date instead of the actual date 2. returns it twice -- https://mail.python.org/mailman/listinfo/python-list