长效ip在Delphi中使用方法,固定长效http代理爬虫ip Delphi接入教程
时间:2022-08-19 来源:枫之叶网络
最近小标遇到的一些客户都是用Delphi使用长效ip来进行大数据采集爬虫,以下是小编汇总的Delphi使用枫之叶网络固定长效爬虫http代理ip的使用demon:
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IDHTTP;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
const
targetUrl = 'http://www.pachongdaili.com/';
proxyServer = 'pachongdaili.com/';
proxyPort = 65105;
proxyUser = 'pachongdaili';
proxyPass = 'pachongdaili';
var
IDHTTP1 : TIDHTTP;
begin
Application.ProcessMessages;
IDHTTP1 := TIDHTTP.Create(nil);
with IDHTTP1 do
begin
AllowCookies := True;
HandleRedirects := True;
ProxyParams.BasicAuthentication := True;
ProxyParams.ProxyServer := proxyServer;
ProxyParams.ProxyPort := proxyPort;
ProxyParams.ProxyUsername := proxyUser;
ProxyParams.ProxyPassword := proxyPass;
Request.UserAgent := 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko)';
IDHTTP1.Get(targetUrl);
end;
end;
end.
当前地址:http://www.pachongdaili.com/support/a453.html 客服联系QQ:475685360
最近小标遇到的一些客户都是用Delphi使用长效ip来进行大数据采集爬虫,以下是小编汇总的Delphi使用枫之叶网络固定长效爬虫http代理ip的使用demon:
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IDHTTP;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
const
targetUrl = 'http://www.pachongdaili.com/';
proxyServer = 'pachongdaili.com/';
proxyPort = 65105;
proxyUser = 'pachongdaili';
proxyPass = 'pachongdaili';
var
IDHTTP1 : TIDHTTP;
begin
Application.ProcessMessages;
IDHTTP1 := TIDHTTP.Create(nil);
with IDHTTP1 do
begin
AllowCookies := True;
HandleRedirects := True;
ProxyParams.BasicAuthentication := True;
ProxyParams.ProxyServer := proxyServer;
ProxyParams.ProxyPort := proxyPort;
ProxyParams.ProxyUsername := proxyUser;
ProxyParams.ProxyPassword := proxyPass;
Request.UserAgent := 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko)';
IDHTTP1.Get(targetUrl);
end;
end;
end.
当前地址:http://www.pachongdaili.com/support/a453.html 客服联系QQ:475685360