diff --git a/CHANGELOG.md b/CHANGELOG.md index 091bb902..cb6da7a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## Unreleased + ## 1.20.4 - 2022-02-06 ### Additions - [e621] add `favorite` extractor ([#2250](https://github.com/mikf/gallery-dl/issues/2250)) diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index f459fbac..7af88557 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -1091,7 +1091,13 @@ class TwitterAPI(): instructions = instructions[key] instructions = instructions["instructions"] - entries = instructions[0]["entries"] + for instr in instructions: + if instr.get("type") == "TimelineAddEntries": + entries = instr["entries"] + break + else: + raise KeyError() + except (KeyError, IndexError): extr.log.debug(data) diff --git a/gallery_dl/version.py b/gallery_dl/version.py index cedbfa06..cb832bb3 100644 --- a/gallery_dl/version.py +++ b/gallery_dl/version.py @@ -6,4 +6,4 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -__version__ = "1.20.4" +__version__ = "1.20.5-dev"