- if opts.localhtml is None:
- url = 'http://yppedia.puzzlepirates.com/' + url_rhs
- debug('IslandInfo retrieving YPP '+url);
- return urllib.urlopen(url)
- else:
- return file(opts.localhtml + '/' + url_rhs, 'r')
- def yoweb_url(self):
- soup = BeautifulSoup(self.yppedia_dataf())
+ return yppedia(url_rhs)
+ def __str__(self):
+ return `(self.ocean, self.name)`
+
+class IslandExtendedInfo(IslandBasicInfo):
+ # Public data attributes (inherited):
+ # ocean
+ # name
+ # Public data attributes (additional):
+ # islandid
+ # yoweb_url
+ # flagid
+ def __init__(self, ocean, islename):
+ IslandBasicInfo.__init__(self, ocean, islename)
+ self.islandid = None
+ self.yoweb_url = None
+ self._collect_yoweb()
+ self._collect_flagid()
+
+ def _collect_yoweb(self):
+ debug('IEI COLLECT YOWEB '+`self.name`)
+ self.islandid = None
+ self.yoweb_url = None
+
+ soup = BeautifulSoup(self.yppedia())