1.0.0 • Published 11 months ago
@minhchi1509/thread-downloader v1.0.0
Features
- Download photos, videos, audios from all user posts
!WARNING The above features only apply to public or private thread profiles (you have already followed).
!NOTE All downloaded photos and videos will be saved in the Downloads folder (for Windows) on your computer.
Installation
npm install @minhchi1509/thread-downloaderUsage
- This is an example:
import { ThreadDownloader } from "@minhchi1509/thread-downloader";
// Cookies of your Thread account. You can get it by using Cookie-Editor extension on Chrome
const cookies = "YOUR_THREAD_COOKIES";
// Username of the Thread account you want to download
const username = "minhchi1509";
const threadDownloader = new ThreadDownloader(cookies);
// Download all posts of the user
threadDownloader.post.downloadAllUserPosts(username);API Documentation
Download posts media
threadDownloader.post.downloadAllUserPosts(
username,
writeStatisticFile,
downloadMedia,
limit
);Parameters:
- username (string, required): The username of thread user that you want to download their media
- writeStatisticFile (boolean, optional): If
true, it will output a CSV file containing information about the posts. Default value:true - downloadMedia (boolean, optional): If
true, it will download videos, photos about the posts. Default value:true - limit (number, optional): The limit number of posts you want to download in one execution and it MUST be a multiple of 4. Suitable when a user has too many posts and you only want to download (example: 40 posts) at a time per execution. Default value:
Infinity
!WARNING Note that when you specify the value of
limitparameter, after the batch download is complete, there will be a folder named cache_cursor/username and it contains files like posts.json to save information for the next posts download. Please DO NOT edit anything in these files. If you want to download posts again from the beginning, delete cache_cursor/username/posts.json files.
1.0.0
11 months ago