Answer the question
In order to leave comments, you need to log in
How to parse vk.com with node.js?
Hello!
I want to get links with short names of groups (meetings) on vk.com on node.js using cheerio.
var website_url = "https://vk.com/groups?act=catalog&c%5Bcity%5D=96&c%5Bcountry%5D=1&c%5Bsection%5D=communities&c%5Bskip_catalog%5D=1&c%5Bsort%5D=1&c%5Btype%5D=3";
request({
uri: website_url,
method:'POST',
encoding:'binary'
}, function (error, response, html) {
if (!error && response.statusCode == 200) {
var $ = cheerio.load(html);
$('.labeled.title').each(function(i, elem){
var a = $(this).children();
var url = a.attr('href');
console.log(url);
});
} else if (error) {
console.log(error);
}
});
Answer the question
In order to leave comments, you need to log in
https://vk.com/search?c%5Bcity%5D=123&c%5Bcountry%...
Try another link. There is no need for authorization or tokens.
Parsed by anything and any way
PS VKAPI does not have the required method, but you need to get a list of meetings around the city)
https://vk.com/dev/groups.search
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question