長(zhǎng)效ip在Delphi中使用方法,固定長(zhǎng)效http代理爬蟲ip Delphi接入教程
時(shí)間:2022-08-19 來源:楓之葉網(wǎng)絡(luò)
最近小標(biāo)遇到的一些客戶都是用Delphi使用長(zhǎng)效ip來進(jìn)行大數(shù)據(jù)采集爬蟲,以下是小編匯總的Delphi使用楓之葉網(wǎng)絡(luò)固定長(zhǎng)效爬蟲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.xbltjxp.cn/';
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.
當(dāng)前地址:http://www.xbltjxp.cn/support/a453.html 客服聯(lián)系QQ:475685360
最近小標(biāo)遇到的一些客戶都是用Delphi使用長(zhǎng)效ip來進(jìn)行大數(shù)據(jù)采集爬蟲,以下是小編匯總的Delphi使用楓之葉網(wǎng)絡(luò)固定長(zhǎng)效爬蟲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.xbltjxp.cn/';
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.
當(dāng)前地址:http://www.xbltjxp.cn/support/a453.html 客服聯(lián)系QQ:475685360