[instagram] don't warn on minor size differences (#8300)

only emit a warning with 'warn-images' if the reported original size
is at least 10% smaller then the size of the returned image
This commit is contained in:
Mike Fährmann
2026-01-01 09:54:07 +01:00
parent 9b6b8deb9e
commit b1cae08507

View File

@@ -269,8 +269,8 @@ class InstagramExtractor(Extractor):
width = image["width"]
height = image["height"]
if self._warn_image < ((width < width_orig) +
(height < height_orig)):
if self._warn_image < ((width * 1.1 < width_orig) +
(height * 1.1 < height_orig)):
self.log.warning(
"%s: Available image resolutions lower than the "
"original (%sx%s < %sx%s). "