-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwall_getPosts_all_two.vk
60 lines (57 loc) · 5.68 KB
/
wall_getPosts_all_two.vk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
var posts_cnt;
var posts;
var post;
var post_format;
var post_id;
var post_from_id;
// var post_owner_id;
var post_date;
var post_comments_cnt;
var post_likes_cnt;
var post_repost_cnt;
var post_list = [];
var offset_posts = Args.global_offset_posts;
offset_posts = parseInt(offset_posts);
// var offset_posts = 0;
var run_count = 0;
var iter_count = 20;
while (iter_count > run_count )
{posts = API.wall.get(
{"owner_id":(Args.owner_id),
"domain":(Args.domain),
"offset":(offset_posts),
"count":"100",
"filter":"all",
"extended":"0",
"v":"5.42"}
);
post = posts.items;
post_id = post@.id;
post_from_id = post@.from_id;
// post_owner_id = post@.owner_id;
post_date = post@.date;
post_comments_cnt = post@.comments;
post_comments_cnt = post_comments_cnt@.count;
post_likes_cnt = post@.likes;
post_likes_cnt = post_likes_cnt@.count;
post_repost_cnt = post@.reposts;
post_repost_cnt = post_repost_cnt@.count;
post_format = [(post_id),(post_date),(post_comments_cnt),(post_likes_cnt),(post_repost_cnt),(post_from_id)];
// post_list.push(posts.items@.id);
post_list.push(post_format);
offset_posts = offset_posts + 100;
run_count = run_count + 1;
posts_cnt = posts.count;
};
return {"posts_cnt": posts_cnt,
"run_count":run_count,
"iter_count":iter_count,
"offset_posts": offset_posts,
"posts": post_list};
//response: {
//posts_cnt: 47588,
//run_count: 20,
//iter_count: 20,
//offset_posts: 2000,
//posts: [[[481547, 482215, 482213, 482212, 482210, 482205, 482199, 482197, 482184, 482170, 482149, 482145, 482142, 482128, 482126, 482121, 482114, 482107, 482086, 482066, 482061, 482051, 482049, 482046, 482044, 482042, 482038, 482036, 482035, 482032, 482015, 482012, 482000, 481999, 481989, 481986, 481978, 481973, 481965, 481960, 481958, 481957, 481950, 481945, 481941, 481938, 481935, 481932, 481929, 481926, 481922, 481906, 481903, 481900, 481897, 481888, 481882, 481880, 481879, 481878, 481877, 481869, 481867, 481863, 481847, 481826, 481812, 481802, 481794, 481789, 481787, 481782, 481779, 481777, 481776, 481773, 481769, 481757, 481754, 481753, 481752, 481750, 481749, 481748, 481746, 481738, 481733, 481730, 481726, 481710, 481701, 481700, 481697, 481695, 481690, 481688, 481686, 481685, 481682, 481601], [1469463314, 1469716277, 1469715325, 1469714548, 1469713514, 1469712625, 1469711720, 1469710971, 1469709907, 1469706323, 1469703709, 1469702715, 1469701882, 1469699133, 1469698241, 1469696583, 1469695515, 1469694643, 1469692907, 1469691824, 1469691632, 1469690106, 1469689411, 1469688314, 1469687402, 1469686954, 1469685727, 1469684713, 1469683830, 1469676632, 1469653716, 1469653014, 1469649689, 1469649444, 1469646915, 1469646055, 1469644239, 1469642540, 1469638882, 1469637908, 1469637014, 1469636112, 1469634308, 1469629815, 1469628927, 1469628173, 1469627140, 1469626211, 1469625327, 1469623539, 1469619928, 1469615432, 1469614515, 1469612712, 1469610941, 1469608264, 1469606508, 1469603731, 1469602951, 1469601936, 1469601000, 1469598323, 1469597415, 1469590269, 1469566987, 1469562264, 1469560516, 1469557852, 1469556106, 1469553322, 1469552413, 1469551508, 1469550632, 1469549706, 1469548874, 1469547923, 1469546129, 1469543429, 1469542508, 1469541780, 1469540743, 1469539824, 1469538922, 1469538178, 1469537140, 1469533551, 1469530913, 1469529368, 1469526345, 1469522716, 1469521869, 1469520169, 1469517328, 1469516583, 1469515542, 1469514600, 1469511922, 1469511009, 1469503838, 1469480460], null, null, null, [-46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810], [-46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810, -46631810]]]
//}