菜鸟提问:关于idhttp部分网站无法得到全部的html代码
D7+Indy 9.0代码如下:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP, StdCtrls;
type
TForm1 = class(TForm)
idhtp1: TIdHTTP;
btn1: TButton;
mmo1: TMemo;
Edit1: TEdit;
procedure btn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
var
s :string;
begin
s:=idhtp1.Get(edit1.text);
mmo1.Text :=s;
end;
end.
访问如http://www.0591qs.cn/div/article.php?type=blog&itemid=1
http://blog.enet.com.cn/article.php?type-blog-cid-9-itemid-4437.html
这两个网页就无法完全得到网页的代码,而且每运行一次得到的代码位置都不一样,感觉像是还没完全读入过程就已经中止一了样,可是像其它网站甚至新浪网这样的大网站又都能正常得到全部代码,我去看了好多人的,又都没问题!
请问这是什么原因,如何解决!