TikTok favorites exporter
Save favorited videos so they don't get lost if they end up getting removed from TikTok.
-
setup
git clone https://github.com/sbdchd/tiktoker.git cd tiktoker poetry config virtualenvs.in-project true poetry install
-
login to tiktok.com and grab your session id cookie value using the dev tools
-
download your favorites metadata
./.venv/bin/python -m tiktoker export-favorites-metadata --session-id=$SESSION_ID
-
download the images for slideshow favorites
NOTE:
$EXPORT_ID
is printed by theexports-favorites-metadata
command./.venv/bin/python -m tiktoker export-slideshow-images --export-id=$EXPORT_ID
-
download the videos (and audio for slideshows) using yt-dlp
NOTE:
$VIDEO_URL_PATH
is printed by theexport-favorites-metadata
command and defaults totiktok-video-urls.txt
yt-dlp -o "tiktok-videos/tiktok@%(uploader)s:%(id)s:%(title).100B.%(ext)s" -a $VIDEO_URL_PATH
-
enjoy your favorites locally!
All the media and related metadata is saved locally. You can peruse the sqlite database for more info on a given video!