请教一下 以下这段代码 怎么修改了后搜索不到结果呢?
function TBaiduSearch.SetSearchUrl :string;
const
BD_PRE = 'http://www.baidu.com/s?rn=';
BD_MIDH = '&wd=';
BD_MIDL = '&pn=';
BD_END = '&usm=2';
BD_PN = 100;
begin
Result := BD_PRE + IntToStr(BD_PN) + BD_MIDH + URLEncode(_KEYWORD) + BD_MIDL + IntToStr(_CURR_PAGE*BD_PN) + BD_END;
//
_ENGINE := Integer(weBaidu);
_UTF8 := False;
end;function TBaiduSearch.AnalyzeLink(inUrl : string; var outUrl :string):boolean;
const
BD_CRTL = '&url=';
BD_TAL = '&b=';
BD_COM = 'http://www.baidu.com/baidu.php?url=';
var
iPos : Integer;
begin
iPos := Pos(BD_CRTL,inUrl);
Result := iPos > 0 ;
if Result then
begin
outUrl := inUrl;
Delete(outUrl,1,Length(BD_CRTL)+iPos-1);
iPos := Pos(BD_TAL,outUrl);
if iPos>0 then outUrl := Copy(outUrl,1,iPos-1);
outUrl := UrlDecode(outUrl);
Exit;
end;
iPos := Pos(BD_COM,inUrl);
Result := iPos > 0 ;
if Result then
outUrl := inUrl;
end;
function TBaiduSearch.SetSearchUrl :string;
const
BD_PRE = 'http://www.baidu.com/s?rn=';
BD_MIDH = '&wd=';
BD_MIDL = '&pn=';
BD_END = '&usm=2';
BD_PN = 100;
begin
Result := BD_PRE + IntToStr(BD_PN) + BD_MIDH + URLEncode(_KEYWORD) + BD_MIDL + IntToStr(_CURR_PAGE*BD_PN) + BD_END;
//
_ENGINE := Integer(weBaidu);
_UTF8 := False;
end;function TBaiduSearch.AnalyzeLink(inUrl : string; var outUrl :string):boolean;
const
BD_CRTL = '&url=';
BD_TAL = '&b=';
BD_COM = 'http://www.baidu.com/baidu.php?url=';
var
iPos : Integer;
begin
iPos := Pos(BD_CRTL,inUrl);
Result := iPos > 0 ;
if Result then
begin
outUrl := inUrl;
Delete(outUrl,1,Length(BD_CRTL)+iPos-1);
iPos := Pos(BD_TAL,outUrl);
if iPos>0 then outUrl := Copy(outUrl,1,iPos-1);
outUrl := UrlDecode(outUrl);
Exit;
end;
iPos := Pos(BD_COM,inUrl);
Result := iPos > 0 ;
if Result then
outUrl := inUrl;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货