Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http.TargetHost := 'www.instagram.com';
- http.UserAgent := 'Mozilla/3.0 (compatible; Indy Library)';
- http.Headers.Add('Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8');
- if http.HTTPMethod('get', 'https://www.instagram.com/oauth/authorize/?client_id=c3510d694cec48bbaabea7dcdf20986f&redirect_uri=http://stapico.ru/accounts/auth/complete&response_type=code&scope=likes+comments+relationships') then
- begin
- token := Pars('csrftoken=', http.Headers.Text, ';');
- http.Clear;
- data.WriteString('csrfmiddlewaretoken=' + token + '&username=' + login + '&password=' + pass);
- http.TargetHost := 'www.instagram.com';
- http.UserAgent := 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0';
- http.Headers.Add('Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8');
- http.MimeType := 'application/x-www-form-urlencoded';
- http.Headers.Add('Referer:https://www.instagram.com/accounts/login/?force_classic_login=&next=/oauth/authorize/' + '%3Fclient_id%3Dc3510d694cec48bbaabea7dcdf20986f%26redirect_uri%3Dhttp%3A//stapico.ru/accounts/auth/complete%26response_type%3Dcode%26scope%3Dlikes%2Bcomments%2Brelationships');
- http.Document.LoadFromStream(data);
- if http.HTTPMethod('post', 'https://www.instagram.com/accounts/login/?force_classic_login=&next=/oauth/authorize/%3Fclient_id%3Dc3510d694cec48bbaabea7dcdf20986f%26redirect_uri%3' + 'Dhttp%3A//stapico.ru/accounts/auth/complete%26response_type%3Dcode%26scope%3Dlikes%2Bcomments%2Brelationships') then
- begin
- if (Pos('u/accounts/auth/complete&response', http.Headers.Text) <> 0) then
- begin
- html.LoadFromStream(http.Document);
- http.Clear;
- http.Headers.Clear;
- http.TargetHost := 'www.instagram.com';
- http.UserAgent := 'Mozilla/3.0 (compatible; Indy Library)';
- http.Headers.Add('Accept:image/png,image/*;q=0.8,*/*;q=0.5');
- http.Headers.Add('Referer:https://www.instagram.com/');
- if http.HTTPMethod('get', 'https://www.instagram.com/' + login + '/?__a=1') then
- begin
- html.LoadFromStream(http.Document);
- podpis := pars('"follows": {"count":', html.Text, '}');
- podpisan := pars('"followed_by": {"count":', html.Text, '}');
- media := pars(' "media": {"count":', html.Text, ',');
- media := StringReplace(media, '}', '', [rfReplaceAll, rfIgnoreCase]);
- checkpoint := 'Нет';
- rezult := 1;
- Inc(godak);
- end
- else
- rezult := 0;
- end
- else
- begin
- rezult := 2;
- if Pos('checkpoint_logged', http.Headers.Text) <> 0 then
- begin
- rezult := 3;
- Inc(nogames);
- end;
- if http.ResultCode = 403 then
- rezult := 0;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement