old_contents: # scrapeSum.py
  # simple web scraper to scrape numbers from span tags
  # practice assignment using BeautifulSoup to extract data from a page
  # Joe Ryan
  # 11/19/2015
  
  import urllib
  from BeautifulSoup import *
  
  url = raw_input('Enter URL - ')
  html = urllib.urlopen(url).read()
  
  soup = BeautifulSoup(html)
  summation = 0
  tags = soup('span')
  
  for tag in tags:
    print 'TAG:', tag
    print 'Contents:', tag.contents
    print 'Attrs:', tag.attrs
    summation += int(tag.contents[0])
  
  print summation
  
new_contents: # scrapeSum.py
  # simple web scraper to scrape numbers from span tags
  # practice assignment using BeautifulSoup to extract data from a page
  # Joe Ryan
  # 11/19/2015
  
  import urllib
  from BeautifulSoup import *
  
  url = raw_input('Enter URL - ')
  html = urllib.urlopen(url).read()
  
  soup = BeautifulSoup(html)
  summation = 0
  tags = soup('span')
  
  for tag in tags:
    summation += int(tag.contents[0])
  
  print summation
  
subject: remove scraperSum printout of each tag and just output the total sum.