gallery-dl icon indicating copy to clipboard operation
gallery-dl copied to clipboard

[Twitter] Can only download around 1000 files!

Open ForxBase opened this issue 1 year ago • 7 comments

The program can only download around 1000 media files, so it's a big issue for accounts with several thousand files. Please help!

ForxBase avatar Feb 10 '24 16:02 ForxBase

Twitter only lets you see the newest 1000 files

a84r7a3rga76fg avatar Feb 11 '24 01:02 a84r7a3rga76fg

Twitter only lets you see the newest 1000 files

So it's not possible to download complete profiles at all?

ForxBase avatar Feb 11 '24 11:02 ForxBase

So it's not possible to download complete profiles at all?

Depends on which profile that is. It is kinda possible for public, non-shadowbanned profiles tweets from whom can appear in search. Here is a rough algorithm:

First you locate the oldest tweet you've managed to download so far and extract its publication date. Given this date, re-run gallery-dl like so:

gallery-dl --cookies .\cookies-twitter-com.txt "https://twitter.com/search?q=from%3A{author_handle}%20until%3A{date}"

where {author_handle} is the author handle without the @, and {date} is the date of that oldest tweet plus maybe a day or so in YYYY-MM-DD format (like 2021-11-30). You may need to run this a couple of times, updating the date if the previous run has resulted in any tweets getting downloaded.

oxi7589 avatar Feb 11 '24 18:02 oxi7589

gallery-dl already does something very similar by default. It first grabs all Tweets from /USER/media and then from /search?q=from:USER max_id=LAST MEDIA TWEET ID (See here). If the search doesn't return any results then the ~1000 Tweets from /USER/media is all you're going to get.

mikf avatar Feb 11 '24 19:02 mikf

gallery-dl already does something very similar by default. It first grabs all Tweets from /USER/media and then from /search?q=from:USER max_id=LAST MEDIA TWEET ID (See here). If the search doesn't return any results then the ~1000 Tweets from /USER/media is all you're going to get.

Thanks for the info. So is there no way to get all files? If a profile has 12K files, the program can only give you 1/12 of the uploaded files.

ForxBase avatar Feb 11 '24 19:02 ForxBase

gallery-dl already does something very similar by default

Nice, didn't know that. But that still doesn't solve the problem of search results ending abruptly. Just verified on a large profile I've been meaning to download (~1500 media elements): gallery-dl managed to get around 1100 first try, which is better than ~1000 the /media endpoint alone yields, but still not everything. Continuing manually with search queries worked, though. I've also noticed that if the timepoint is far enough in the past, there may be no results at first, but the same query repeated after a few seconds yields some more useful results.

oxi7589 avatar Feb 11 '24 19:02 oxi7589

Always has been this way..

Hrxn avatar Feb 11 '24 21:02 Hrxn