Код:
http.HTTPMethod('GET', 'https://api.vk.com/method/groups.get?uids='+id+'&filter=admin&access_token='+token);
html.LoadFromStream(http.Document);
html.Text:=StringReplace(html.Text, '[', ',',[rfReplaceAll, rfIgnoreCase]);
html.Text:=StringReplace(html.Text, ']', ',',[rfReplaceAll, rfIgnoreCase]);
html.Text:=StringReplace(html.Text, ',', ':;',[rfReplaceAll, rfIgnoreCase]);
http.Document.Clear;
http.Headers.Clear;
end;
begin
reg3:=tregexpr.Create;
reg3.Expression:=';(.*?):';
if reg3.Exec(html.Text) then repeat
prx3.Add(reg3.Match[1]);
until
not
reg3.Execnext;
prx3.Text:=trim(prx3.Text);
if prx3.Count>0 then
begin
for i := 0 to prx3.Count-1 do
begin
http.HTTPMethod('GET', 'https://api.vk.com/method/groups.getById?gids='+prx3[i]+'&fields=members_count&access_token='+token);
html.LoadFromStream(http.Document);
html.Text:=utf8toansi(html.Text);
bars.Add('Link: http://vk.com/club'+prx3[i]);
bars.Add('Name groups: '+pars('"name":"' , html.Text ,'"'));
bars.Add('Member: ' + pars('"members_count":',html.Text, ',')) ;
bars.Add('Stats: http://vk.com/stats?gid='+prx3[i]);
bars.Add('------------');
end;
end else
bars.Add('Нет групп');
end;
http.Document.Clear;
http.Headers.Clear;