beautiful soup get class info

teddybubu at gmail.com teddybubu at gmail.com
Thu Mar 6 15:22:30 EST 2014


I am using beautifulsoup to get the title and date of the website.
title is working fine but I am not able to pull the date. Here is the code in the url:

 <span class="date">October 22, 2011</span>

In Python, I am using the following code:
date1 = soup.span.text
data=soup.find_all(date="value") 

Results in:

[]
March 5, 2014

What is the proper way to get this info?
Thanks.



More information about the Python-list mailing list