save
This commit is contained in:
1
node/comment/data/detail_comments_2024-03-29.json
Normal file
1
node/comment/data/detail_comments_2024-03-29.json
Normal file
File diff suppressed because one or more lines are too long
32
node/comment/process.js
Normal file
32
node/comment/process.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import fs from 'fs'
|
||||
|
||||
let read = './data/detail_comments_2024-03-29.json'
|
||||
let save = "./data/";
|
||||
|
||||
let video_ids = [
|
||||
"7260749400622894336",
|
||||
"7128686458763889956",
|
||||
"7293100687989148943",
|
||||
"6923214072347512068",
|
||||
"7005490661592026405",
|
||||
"7161000281575148800",
|
||||
"7267478481213181238",
|
||||
"6686589698707590411",
|
||||
"7321200290739326262",
|
||||
"7194815099381484860",
|
||||
"6826943630775831812",
|
||||
"7110263965858549003",
|
||||
"7295697246132227343",
|
||||
"7270431418822446370",
|
||||
"6882368275695586568",
|
||||
"7000587983069957383",
|
||||
]
|
||||
let saveFileStr = fs.readFileSync(read, "utf8");
|
||||
let data = JSON.parse(saveFileStr)
|
||||
video_ids.map(v => {
|
||||
let video_comments = data.filter(a => a.aweme_id == v)
|
||||
console.log('v', v, 'c', video_comments.length)
|
||||
fs.writeFileSync(`./video_id_${v}.json`, JSON.stringify(video_comments, null, 2));
|
||||
|
||||
})
|
||||
console.log('data', data.length)
|
||||
Reference in New Issue
Block a user