การตั้งค่าสคริปต์เก็บข้อมูลผู้ใช้
scrape_users ส่งออกชื่อผู้ใช้จากผู้ติดตาม ผู้ที่ติดตามอยู่ หรือผลการค้นหาผ่าน UI ของอุปกรณ์ Android จริง รุ่น Pro รองรับ TikTok, Instagram และ Threads
script_config
| พารามิเตอร์ | ชนิด | จำเป็น | ค่าเริ่มต้น | คำอธิบาย |
|---|---|---|---|---|
| mode | string | ไม่ | followers | followers, following หรือ keyword |
| target_username | string | มีเงื่อนไข | "" | บัญชีที่จะเปิดรายการ |
| search_keyword | string | มีเงื่อนไข | "" | คำค้นหาในโหมด keyword |
| max_scrape_count | integer | ไม่ | 50 | จำนวนชื่อใหม่สูงสุด (1–10,000) |
โหมด followers/following ต้องมี target_username; โหมด keyword ต้องมี search_keyword
ตัวอย่าง 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
}
}'
เขียนชื่อผู้ใช้ทีละหนึ่งชื่อต่อบรรทัดใน <work_dir>/download/ โดยใช้ชื่อ <target>_followers.txt, <target>_following.txt หรือ <keyword>.txt การทำงานครั้งต่อไปจะต่อท้ายไฟล ์เดิม และหยุดเมื่อถึงขีดจำกัดหรือไม่พบแถวใหม่
รหัสข้อผิดพลาด
| รหัส | คำอธิบาย |
|---|---|
| 40001 | ขาดบัญชีหรือคำค้นหาที่โหมดต้องใช้ |
| 40003 | บิลด์หรือแพลตฟอร์มที่เลือกไม่รองรับสคริปต์นี้ |
| 40301 | API ต้องใช้แพ็กเกจ Pro ขึ้นไป |