Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #67950

beautiful soup get class info

Newsgroups comp.lang.python
Date 2014-03-06 12:22 -0800
Message-ID <e73d29eb-17bb-472e-bdc4-c38ca904c60f@googlegroups.com> (permalink)
Subject beautiful soup get class info
From teddybubu@gmail.com

Show all headers | View raw


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.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

beautiful soup get class info teddybubu@gmail.com - 2014-03-06 12:22 -0800
  Re: beautiful soup get class info John Gordon <gordon@panix.com> - 2014-03-06 20:58 +0000
    Re: beautiful soup get class info teddybubu@gmail.com - 2014-03-06 13:38 -0800
      Re: beautiful soup get class info John Gordon <gordon@panix.com> - 2014-03-06 22:28 +0000
        Re: beautiful soup get class info teddybubu@gmail.com - 2014-03-06 17:37 -0800
          Re: beautiful soup get class info Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-07 01:48 +0000
  Re: beautiful soup get class info Christopher Welborn <cjwelborn@live.com> - 2014-03-11 21:04 -0500
  Re: beautiful soup get class info Peter Otten <__peter__@web.de> - 2014-03-12 08:36 +0100

csiph-web