timur-tabi/kickstarter-pledge-watch — pull request #1 by BioGeek (2013-09-12 01:33:17+00:00)
Title: Handle optional succeeding three letter currency codes

The relevant HTML of the omate pledge page (https://www.kickstarter.com/projects/omate/omate-truesmart-water-resistant-standalone-smartwa/pledge/new) looks like:

which results in

Traceback (most recent call last):
File "kswatch.py", line 152, in
rewards = ks.process(url)
File "kswatch.py", line 65, in process
self.feed(html) # feed() starts the HTMLParser parsing
File "C:\Python27\lib\HTMLParser.py", line 114, in feed
self.goahead(0)
File "C:\Python27\lib\HTMLParser.py", line 158, in goahead
k = self.parse_starttag(i)
File "C:\Python27\lib\HTMLParser.py", line 322, in parse_starttag
self.handle_startendtag(tag, attrs)
File "C:\Python27\lib\HTMLParser.py", line 404, in handle_startendtag
self.handle_starttag(tag, attrs)
File "kswatch.py", line 79, in handle_starttag
self.value = float(attrs['title'][1:].replace(',', ''))
ValueError: invalid literal for float(): 10.00 USD

This pull request also removes the succeeding three letter monetary code.