[twitter] fix extraction (#2275)

pull/2279/head
Mike Fährmann 3 years ago
parent f351746483
commit 0f1e7ff319
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1,5 +1,7 @@
# Changelog # Changelog
## Unreleased
## 1.20.4 - 2022-02-06 ## 1.20.4 - 2022-02-06
### Additions ### Additions
- [e621] add `favorite` extractor ([#2250](https://github.com/mikf/gallery-dl/issues/2250)) - [e621] add `favorite` extractor ([#2250](https://github.com/mikf/gallery-dl/issues/2250))

@ -1091,7 +1091,13 @@ class TwitterAPI():
instructions = instructions[key] instructions = instructions[key]
instructions = instructions["instructions"] 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): except (KeyError, IndexError):
extr.log.debug(data) extr.log.debug(data)

@ -6,4 +6,4 @@
# it under the terms of the GNU General Public License version 2 as # it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation. # published by the Free Software Foundation.
__version__ = "1.20.4" __version__ = "1.20.5-dev"

Loading…
Cancel
Save