title: Get the date from span tags
body: <p>Using Beautiful Soup, I want to extract the date from text file having list of url's. where the date is defined in the span tags with div class = update. When I try with the below code I just get the result as <code>&lt;span id="time"&gt;&lt;/span&gt;</code> but not the exact time. Please help.for example the type of the links in sabah_url.txt  are "<a href="http://www.dailysabah.com/world/2012/02/20/seeking-international-support-to-block-assad" rel="nofollow">http://www.dailysabah.com/world/2012/02/20/seeking-international-support-to-block-assad</a>"</p>
  
  <pre><code>from cookielib import CookieJar
  import urllib2
  from bs4 import BeautifulSoup
  cj = CookieJar()
  opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
  try:
      url_file = open('sabah_url.txt', 'r')
      for line in url_file:
         print line
         #Opens each extracted URL with urllib2 library
         data = urllib2.urlopen(line).read()
         soup = BeautifulSoup(data)
         #Extracts all the dates of URLs ith its respective class as defined
         date = soup.find_all('span', {'id': 'time'})
         for item in date:
            print item 
  except BaseException, e:
      print 'failed', str(e) 
      pass
  </code></pre>