diff options
| author | 2024-03-25 02:57:44 -0400 | |
|---|---|---|
| committer | 2024-03-25 02:57:44 -0400 | |
| commit | 6e662211019a89caec44de8a57c675872b0b5498 (patch) | |
| tree | 5d9d5a2b7efc3a24dd6074e99b253b639fe5af1d /gallery_dl/extractor/redgifs.py | |
| parent | 01166fa52707cc282467427cf0e65c1b8983c4be (diff) | |
New upstream version 1.26.9.upstream/1.26.9
Diffstat (limited to 'gallery_dl/extractor/redgifs.py')
| -rw-r--r-- | gallery_dl/extractor/redgifs.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gallery_dl/extractor/redgifs.py b/gallery_dl/extractor/redgifs.py index 6185acb..327bcd1 100644 --- a/gallery_dl/extractor/redgifs.py +++ b/gallery_dl/extractor/redgifs.py @@ -52,23 +52,22 @@ class RedgifsExtractor(Extractor): gif.update(metadata) gif["count"] = cnt + gif["date"] = text.parse_timestamp(gif.get("createDate")) yield Message.Directory, gif for num, gif in enumerate(gifs, enum): - url = self._process(gif) + gif["_fallback"] = formats = self._formats(gif) + url = next(formats, None) + if not url: self.log.warning( "Skipping '%s' (format not available)", gif["id"]) continue + gif["num"] = num gif["count"] = cnt yield Message.Url, url, gif - def _process(self, gif): - gif["_fallback"] = formats = self._formats(gif) - gif["date"] = text.parse_timestamp(gif.get("createDate")) - return next(formats, None) - def _formats(self, gif): urls = gif["urls"] for fmt in self.formats: |
