[instagram] relax video quality warning regex (#8078)

https://github.com/mikf/gallery-dl/issues/8078#issuecomment-3235445551
This commit is contained in:
Mike Fährmann
2025-08-29 10:03:28 +02:00
parent de05453707
commit 4a5aee6e1f

View File

@@ -242,8 +242,7 @@ class InstagramExtractor(Extractor):
if self._warn_video_ua:
self._warn_video_ua = False
pattern = text.re(
r"AppleWebKit/537\.36 \(KHTML, like Gecko\) "
r"Chrome/\d+\.\d+\.\d+\.\d+ Safari/537\.36$")
r"Chrome/\d{3,}\.\d+\.\d+\.\d+(?!\d* Mobile)")
if not pattern.search(self.session.headers["User-Agent"]):
self.log.warning("Potentially lowered video quality "
"due to non-Chrome User-Agent")