A feature-rich command-line audio/video downloader
[extractor/amazonstore] Retry to avoid captcha page (#4811)
Lesmiscore3c7a27623432
diff --git a/yt_dlp/extractor/amazon.py b/yt_dlp/extractor/amazon.pyindex de4917adcc..56a8d844ac 100644--- a/yt_dlp/extractor/amazon.py+++ b/yt_dlp/extractor/amazon.py@@ -1,5 +1,5 @@from .common import InfoExtractor-from ..utils import int_or_none+from ..utils import ExtractorError, int_or_noneclass AmazonStoreIE(InfoExtractor):@@ -38,8 +38,14 @@ class AmazonStoreIE(InfoExtractor):def _real_extract(self, url):id = self._match_id(url)- webpage = self._download_webpage(url, id)- data_json = self._parse_json(self._html_search_regex(r'var\s?obj\s?=\s?jQuery\.parseJSON\(\'(.*)\'\)', webpage, 'data'), id)++ for retry in self.RetryManager(fatal=True):+ webpage = self._download_webpage(url, id)+ try:+ data_json = self._parse_json(self._html_search_regex(r'var\s?obj\s?=\s?jQuery\.parseJSON\(\'(.*)\'\)', webpage, 'data'), id)+ except ExtractorError as e:+ retry.error = e+entries = [{'id': video['marketPlaceID'],'url': video['url'],