Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TMainForm.LPTimer(Sender: TObject);
- const
- IMGSIGN1='<div class="tdbox visible_anim">';
- var
- Pict:TJpegImage;
- ImageData:TmemoryStream;
- ImgLink,Result,CurrentID,NewID:string;
- begin
- Pict:=TJpegImage.Create;
- ImageData:=TmemoryStream.Create;
- 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;
- CurrentID:=ID;
- try
- {Поиск всех}
- // Result:=Http.Get('https://loveplanet.ru/a-searchlik/d-1/foto-1/pol-1/spol-2/bage-18/tage-30/geo-0,0,0/purp-0/newface-0/country-0/region-0/city-0//popup/login-'+CurrentID+'/likes-1/num-1');
- {только онлайн}
- Result:=Http.Get('https://loveplanet.ru/a-searchlik/d-1/foto-1/p-0/pol-1/spol-2/geo-0,0,0/purp-0/online-1/bage-18/tage-30/country-0/region-0/city-0//popup/login-'+CurrentID+'/likes-1/num-1');
- if Pos(IMGSIGN1, Result) <> 0 then
- begin
- ImgLink:=Copy(result,Pos(IMGSIGN1, Result)+61,81);
- if Pos('"',Imglink) <> 0 then
- begin
- Delete(ImgLink,length(ImgLink),1);
- end;
- Http.Get(ImgLink,ImageData);
- ImageData.Seek(0,0);
- Pict.LoadFromStream(ImageData);
- LPImage.Picture.Assign(Pict);
- end;
- except
- end;
- NewID:=Copy(Result,Pos(LikeBTN,Result)+71,Pos(', 1);"><span>Yes</span></div>',Result)-Pos(LikeBTN,Result)-72);
- if NewID='' then
- begin
- ID:=CurrentID;
- end
- else
- begin
- WWD1.Caption:='Готово. Следующее тело на очереди - '+NewID;
- ID:=NewID;
- Inc(count);
- end;
- LikeLabel.Caption:='Liked: '+IntToStr(Count);
- ImageData.Free;
- Pict.Free;
- end;
Advertisement
Add Comment
Please, Sign In to add comment