mwichary / twitter-export-image-fill

A script to download (backup locally) all the images accompanying your tweets
The Unlicense
313 stars 22 forks source link

New hidden export option includes media #10

Open Lucent opened 6 years ago

Lucent commented 6 years ago

Twitter has two ways of getting an archive. One is the way you show. The second requires going to:

Settings and privacy > Your Twitter data > Download your Twitter data > Download data

This archive includes a folder "tweet_media" which contains images and videos, but I can't find a way to associate those filenames with any attributes in tweet.js.

mwichary commented 6 years ago

Ah, interesting. I wonder how new it is. Perhaps related to the recent change in European laws? I’ll try to get my data and check. Weird that they have it in two places now.

vijinho commented 6 years ago

I just downloaded my archive using this method, this is the README: https://gist.github.com/vijinho/2316e96bdc91f94b063a6ab88124a427/1888e5eacf74cdac00acf62bceea54a38d8c041f So my question is - are you already working on updating your code to handle this or too busy? I am thinking of writing something myself, though python isn't my strongest point.

mwichary commented 6 years ago

No, I’m not actively working on this at the moment.

vijinho commented 6 years ago

That's no problem. I've been hacking-together a self-contained PHP CLI script to process this new zip dump which can do various jobs like de-referencing the short URLS, checking target URLS and inserting references to the local files for each tweet, but it's still at an early stage although quite functional. https://gist.github.com/vijinho/73c138a963ec8387b64e04fc5c9245a3

vijinho commented 6 years ago

@Lucent Just a quick-update on my script, it's now here https://github.com/vijinho/tweets-cli and if run with the 'grailbird' option it can link to the media files on the local filesystem using the default twitter backup application 'grailbird' which I've modifed and put here: https://github.com/vijinho/tweets-gb when the index.html is browsed off-line. More work to be done, but hope it helps. Apologies if interrupting this thread has caused any issue @mwichary but I'll stay off here now, thanks.