Chuyển tới nội dung chính

Cấu hình script thu thập người dùng

scrape_users xuất tên người dùng từ người theo dõi, đang theo dõi hoặc kết quả tìm kiếm qua UI của thiết bị Android thật. Bản Pro hỗ trợ TikTok, Instagram và Threads.

script_config​

Tham sốKiểuBắt buộcMặc địnhMô tả
modestringKhôngfollowersfollowers, following hoặc keyword
target_usernamestringCó điều kiện""Tài khoản cần mở danh sách
search_keywordstringCó điều kiện""Từ khóa của chế độ keyword
max_scrape_countintegerKhông50Số tên mới tối đa (1–10.000)

followers/following cần target_username; keyword cần search_keyword.

Ví dụ API Threads​

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "scrape_users",
"platform": "threads",
"script_config": {
"mode": "followers",
"target_username": "@creator",
"max_scrape_count": 50
}
}'

Tên người dùng được ghi từng dòng vào <work_dir>/download/ với tên <target>_followers.txt, <target>_following.txt hoặc <keyword>.txt. Các lần chạy sau ghi thêm vào tệp cũ; script dừng khi đạt giới hạn hoặc không còn dòng mới.

Mã lỗi​

MãMô tả
40001Thiếu tài khoản hoặc truy vấn mà chế độ yêu cầu
40003Bản build hoặc nền tảng đã chọn không hỗ trợ script
40301API yêu cầu gói Pro trở lên

Xem thêm​