Favour the first image we found when we're not expecting multiple images

This commit is contained in:
sizlo 2017-04-18 21:59:04 +01:00
parent 8d84361de4
commit a83911aa67

View file

@ -142,7 +142,7 @@ class Scraper(object):
out.warn(
u"Found %d images instead of 1 at %s with expressions %s" %
(len(imageUrls), url, prettyMatcherList(self.imageSearch)))
image = sorted(imageUrls)[0]
image = imageUrls[0]
out.warn(u"Choosing image %s" % image)
imageUrls = (image,)
elif not imageUrls: