Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TMainForm.LPBtnClick(Sender: TObject);
- var
- Result:string;
- PostData:TStringList;
- begin
- PostData:=Tstringlist.Create;
- PostData.Add('a=logon');
- PostData.Add('login=');
- PostData.Add('password=');
- Http.Request.AcceptLanguage:='en-US,en;q=0.5';
- Http.Request.UserAgent:='Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0';
- Http.AllowCookies:=True;
- Count:=0;
- LikeLabel.Caption:='Liked: 0';
- StatusLabel.Caption:='Status: undefined';
- RankLabel.Caption:='Rank: undefined';
- WWD1.Caption:='Waiting...';
- try
- Result:=Http.Post('https://loveplanet.ru/a-logon',PostData);
- except
- if Http.Response.ResponseText='HTTP/1.1 302 Found' then
- begin
- Log1.Lines.Add('Успешная авторизация - '+'['+Http.Response.ResponseText+']');
- Result:=Http.Get('https://loveplanet.ru/a-searchlik/d-1/foto-1/pol-1/spol-2/bage-18/tage-25/geo-0,0,0/purp-0/newface-1/country-0/region-0/city-0/');
- ID:=Copy(Result,Pos(LikeBTN,Result)+71,Pos(', 1);"><span>Yes</span></div>',Result)-Pos(LikeBTN,Result)-72);
- if Pos(LikeBTN,Result) <> 0 then
- begin
- Log1.Lines.Add('Отлично. Начинаем лайкать.');
- LP.Enabled:=True;
- CHK.Enabled:=True;
- end;
- end;
- end;
- PostData.Free;
- end;
Advertisement
Add Comment
Please, Sign In to add comment