beautiful soup get class info

John Gordon gordon at panix.com
Thu Mar 6 15:58:12 EST 2014


In <e73d29eb-17bb-472e-bdc4-c38ca904c60f at googlegroups.com> teddybubu at gmail.com 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
gordon at panix.com    watch 'House', or a real serial killer to watch 'Dexter'.




More information about the Python-list mailing list