imgs = self.soup.findAll('img',
src=regexp.compile('/yoweb/images/stat.*'))
re = regexp.compile(
-u'\\s*\\S*/([-A-Za-z]+)\\s*$|\\s*\\S*/\\S*\\s*\\(ocean\\-wide\\ \\;([-A-Za-z]+)\\)\\s*$'
+u'\\s*\\S*/([-A-Za-z]+)\\s*$|\\s*\\S*/\\S*\\s*\\(ocean\\-wide(?:\\s|\\xa0)+([-A-Za-z]+)\\)\\s*$'
)
standings = { }
valstr = ''.join(valelem.findAll(text=True))
match = re.match(valstr)
if match is None:
- skl.soupm(key, 'duty "%s" unparseable'+
- ' standing "%s"' % (duty, valstr))
+ skl.soupm(key, ('duty "%s" unparseable'+
+ ' standing "%s"') % (duty, valstr))
continue
standing = match.group(match.lastindex)
standings[duty].append(standing)
html = fetcher.yoweb('pirate.wm?target=', pirate)
self.soup = BeautifulSoup(html,
-# convertEntities=BeautifulSoup.HTML_ENTITIES
+ convertEntities=BeautifulSoup.HTML_ENTITIES
)
self._find_standings()