# Note - this code must run in Python 2.x and you must download
# http://www.pythonlearn.com/code/BeautifulSoup.py
# Into the same folder as this program

import urllib
from bs4 import BeautifulSoup

url = "http://python-data.dr-chuck.net/comments_303992.html"
html = urllib.urlopen(url).read()

soup = BeautifulSoup(html)
# Retrieve all of the anchor tags
tags = soup.find_all('span')
nums = [int(tag.get_text()) for tag in tags]
print sum(nums)