2
# -*- coding: utf-8 -*-
4
# © 2010, David Paleino <dapal@debian.org>
6
# This script is released under the GNU General Public License, version 2.
8
from urllib2 import urlopen
11
base = "http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/%s/"
12
regions = ["Eurasia", "North_America", "Australia", "Islands", "South_America", "Africa"]
17
for line in urlopen(url).readlines():
18
if line.startswith("<li>"):
19
match = re.match("^<li><.*> ([^>]*)<.*>", line)
21
tiles.append(match.group(1).replace(".hgt.zip", ""))
22
f = open("tiles%s.txt" % (regions.index(reg)+1), "w")
23
f.write('\n'.join([reg] + tiles))