---
+++
@@ -247,10 +247,9 @@
self.raw_url = raw_url
self.url = urlparse.urlparse(raw_url)
self.hosts = args.hosts_list.split(',')
- if self.url.path != '':
+ self.filename = 'index.html'
+ if '/' in self.url.path:
self.filename = unquote(self.url.path).rsplit('/', 1)[1]
- if self.filename == '':
- self.filename = 'index.html'
def get_connection(self):
if self.url.scheme == 'http':
@@ -258,7 +257,7 @@
elif self.url.scheme == 'https':
return httplib.HTTPSConnection(self.url.hostname, self.url.port)
else:
- raise Exception('Unknown protocol:%s' % self.proto)
+ raise Exception('Unknown protocol:%s' % self.url.scheme)
def download(self):
progress_bar = ProgressBar(threading.Lock())