jeudi 6 mars 2014

beautiful soup get class info topic




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.





Aucun commentaire:

Enregistrer un commentaire