S
S
shiroleer2015-05-01 23:57:21
In contact with
shiroleer, 2015-05-01 23:57:21

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;

At first, it gave me some kind of result, and after such 5 test scans, the contact began to send me empty answers. Even their debugger on the site returned an empty array. Posted in those. support - limits on the same type of requests. So the question is: how can I solve my problem? Maybe the contact has an undocumented search language (for example, like Twitter with its OR, - etc.)?
Thanks anyway.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Semenov, 2015-05-07
@Ordinatus

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 question

Ask a Question

731 491 924 answers to any question