Answer the question
In order to leave comments, you need to log in
Lots of similar VK API requests?
Greetings. It is necessary to scan the wall of the group (let's say the first 100 posts) for keywords. There are about 40 such groups, and about 20 keywords. In total we get 800 requests. Looking at all this disgrace, it was decided to use the execute method, because using 800 wall.search requests led my server to 504. I pass the following code to it:
var posts = [];
var keywords = Args.keywords.split(",");
var i = 0;
while(i <= keywords.length-1) {
var requestPosts = API.wall.search({"owner_id": "-" + Args.group, "query": keywords[i], "count": 100});
if (requestPosts.count > 0) {
posts.push({"keyword": keywords[i], "posts": requestPosts.items});
}
i = i + 1;
}
return posts;
Answer the question
In order to leave comments, you need to log in
Familiar situation.
For this, it is better not to use the VK API due to rectal limits, it is preferable to parse it without authorization (but it will work only if the groups are open).
Once it was necessary to parse in RSS, I did this .
In such a stream, you can search for the necessary words.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question