aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/twitter.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@gmail.com>2020-05-03 00:06:41 -0400
committerLibravatarUnit 193 <unit193@gmail.com>2020-05-03 00:06:41 -0400
commitf5a2f273c0ccfac264ddfd45384dadfe25d9d7a5 (patch)
tree92f4a00290fc49d27badcde094910f7a5bb8f783 /gallery_dl/extractor/twitter.py
parent6979a952d58bb018e3636276f141ae28c4599143 (diff)
parent90e50db2e3c38f523bb5195d295290b06e5cedb0 (diff)
Update upstream source from tag 'upstream/1.13.6'
Update to upstream version '1.13.6' with Debian dir 56019140fd27c135929da929f616e2bc3456deb9
Diffstat (limited to 'gallery_dl/extractor/twitter.py')
-rw-r--r--gallery_dl/extractor/twitter.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py
index 3a274c7..c409f54 100644
--- a/gallery_dl/extractor/twitter.py
+++ b/gallery_dl/extractor/twitter.py
@@ -33,6 +33,7 @@ class TwitterExtractor(Extractor):
self._user_dict = None
self.logged_in = False
self.retweets = self.config("retweets", True)
+ self.replies = self.config("replies", True)
self.twitpic = self.config("twitpic", False)
self.content = self.config("content", False)
self.videos = self.config("videos", True)
@@ -48,7 +49,9 @@ class TwitterExtractor(Extractor):
for tweet in self.tweets():
data = self._data_from_tweet(tweet)
- if not data or not self.retweets and data["retweet_id"]:
+ if not data or \
+ not self.retweets and data["retweet_id"] or \
+ not self.replies and data["reply"]:
continue
data.update(metadata)
@@ -370,6 +373,11 @@ class TwitterTweetExtractor(TwitterExtractor):
"options": (("videos", "ytdl"),),
"pattern": r"ytdl:https://twitter.com/i/web.+/1103767554424598528",
}),
+ # 'replies' option (#705)
+ ("https://twitter.com/tyson_hesse/status/1103767554424598528", {
+ "options": (("replies", False),),
+ "count": 0,
+ }),
# /i/web/ URL
("https://twitter.com/i/web/status/1155074198240292865", {
"pattern": r"https://pbs.twimg.com/media/EAel0vUUYAAZ4Bq.jpg:orig",