- url = ('http://yppedia.puzzlepirates.com/' +
- (url_base % urllib.quote(ocean,'')))
- debug('fetching',url)
- dataf = urllib.urlopen(url)
- debug('fetched',dataf)
+ url_base = url_base % urllib.quote(ocean,'')
+ if opts.localhtml is None:
+ url = ('http://yppedia.puzzlepirates.com/' + url_base)
+ debug('fetching',url)
+ dataf = urllib.urlopen(url)
+ debug('fetched',dataf)
+ else:
+ dataf = file(opts.localhtml + '/' + url_base, 'r')