Closed nisehime closed 3 years ago
Because Twitter is very inconsistent with its results.
The data for tweet 1392763691599237121 does not contain any media entries (*), even though it should and retweets usually do. It works with "retweets": "original"
, though.
I see. Well, twMediaDownloader doesn't have this issue. So far as I can tell it uses a bit different API urls and the responses contain those media links for the tweet.
After setting "retweets": "original"
I see that request url hasn't changed, nor there's additional requests. Does it mean it gets the metadata from the same response?
twMediaDownloader uses the official Twitter API, gallery-dl only uses the "site-internal" API (what your browser uses while on Twitter). The official API needs a consumer_key
and consumer_secret
, and I wouldn't want to publish the credentials associated with my Twitter account. It's fine for sites like DeviantArt, but maybe not Twitter. If I do implement support for the official API, I'd want to at least wait until they're done with API v2. Also https://github.com/mikf/gallery-dl/issues/980.
Does it mean it gets the metadata from the same response?
Yep, Twitter returns both Retweet and original Tweet (as well as potential replies). "retweets": true
uses the Retweet entry, "retweets": "original"
the original Tweet. You could argue that "original"
should be the default, but backwards compatibility (i.e. someone would complain if anything changed)
twMediaDownloader uses the official Twitter API
Wasn't it using it only to download videos? Unless it has changed recently.
You could argue that
"original"
should be the default
Not really, setting it to "original"
will make saving retweets to the user's folder (the one who's retweeting) impossible, won't it? Can't the program just check the Tweet entry for media files if it hasn't found them in the Retweet entry?
Wasn't it using it only to download videos? Unless it has changed recently.
It seems it is using the official API for regular timelines and https://api.twitter.com/2/timeline/media/
(same as gallery-dl) for media timelines.
https://twitter.com/morino_ya/status/1392763691599237121 (NSFW)
It's just empty. The direct link to the retweeted tweet works fine, but when downloading it from other user's timeline, it is ignored.