Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to download all media from a Twitter thread (tweet sequence)? #1319

Closed
KonoVitoDa opened this issue Feb 16, 2021 · 3 comments
Closed

How to download all media from a Twitter thread (tweet sequence)? #1319

KonoVitoDa opened this issue Feb 16, 2021 · 3 comments

Comments

@KonoVitoDa
Copy link

KonoVitoDa commented Feb 16, 2021

As the title says, I want to download all media from a given sequence of tweets (thread).
This is thread I'm trying to download: https://twitter.com/BlankArts_/status/1322266444516610049

And an additional question: is there some place where I can find all options for any specific site? (Twitter preferably)

@mikf
Copy link
Owner

mikf commented Feb 17, 2021

I want to download all media from a given sequence of tweets (thread).

Not yet possible. It currently only downloads from the first post/tweet.

is there some place where I can find all options for any specific site?

https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst
and search for Twitter etc.

@KonoVitoDa
Copy link
Author

Now, this is almos possible with twitter.conversations. But how to download only the replies from the original tweet author? I tried --filter "author['name']==reply_to" but the result was [twitter][error] FilterError: Evaluating filter expression failed (NameError: name 'reply_to' is not defined), probably because the original tweet hasn't a "reply_to" metadata.

@mikf
Copy link
Owner

mikf commented Jul 18, 2022

reply_to is only defined for replies, so you can first check whether a tweet is a reply with reply_id:

--filter "reply_id and author['name'] == reply_to"

or you use locals().get() to not get an exception for undefined variables:

--filter "author['name'] == locals().get('reply_to')"

I think there is a possibility this not only returns tweets from the original author, since this condition would also be true for a reply to a reply to the original author and both replies belonging to the same user, but I don't think there is a way to check for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants