- for i in range(1, self.pages + 1):
- download_queue.append('%s/%d/%d.%s' % (IMAGE_URL, int(self.img_id), i, self.ext))
- self.downloader.download(download_queue, format_filename('%s-%s' % (self.id, self.name[:200])))
+ if len(self.ext) != self.pages:
+ logger.warning('Page count and ext count do not equal')
+
+ for i in range(1, min(self.pages, len(self.ext)) + 1):
+ download_queue.append('%s/%d/%d.%s' % (IMAGE_URL, int(self.img_id), i, self.ext[i - 1]))
+
+ self.downloader.download(download_queue, self.filename)