2 from ais.html_parser import *
4 if __name__ == '__main__':
5 from optparse import OptionParser
6 parser = OptionParser()
7 options, args = parser.parse_args()
9 html = file(args[0]).read()
10 html = unicode(html, 'iso-8859-1')
11 root = html_parse(html)
12 links = get_elem(root, 'a')
15 href = link.attributes['href']
16 if href.startswith('/Data/VesselsZIP/'):
17 sys.stdout.write(href+'\n')