Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/ItemDownload.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5 by yoffy, Thu Oct 30 05:48:35 2003 UTC revision 1.6 by yoffy, Fri Oct 31 15:01:46 2003 UTC
# Line 144  var Line 144  var
144          ATitle: string;          ATitle: string;
145          DownloadResult: Boolean;          DownloadResult: Boolean;
146          Abone: Boolean;          Abone: Boolean;
147      foundPos: Integer;
148  begin  begin
149          while not Terminated do begin          while not Terminated do begin
150                  FAbort := False;                  FAbort := False;
# Line 447  begin Line 448  begin
448                                          FIcon := gmiWhat;                                          FIcon := gmiWhat;
449                                          if Assigned(OnDownloadMsg) then                                          if Assigned(OnDownloadMsg) then
450                                                  Synchronize(FireDownloadMsg);                                                  Synchronize(FireDownloadMsg);
451            //URL := GikoSys.GetURL( Item.ThreadItem.ParentBoard.BBSID, Item.ThreadItem.FileName );            URL := 'http://www.google.co.jp/search?q=cache:' + Item.ThreadItem.URL;
           URL := 'http://www.google.co.jp/search?q=cache:' + GikoSys.GetURL( Item.ThreadItem.ParentBoard.BBSID, Item.ThreadItem.FileName );  
452                                          URL := StringReplace( URL, 'l50', '', [rfReplaceAll] );                                          URL := StringReplace( URL, 'l50', '', [rfReplaceAll] );
453                                          Modified := Item.ThreadItem.LastModified;                                          Modified := Item.ThreadItem.LastModified;
454            Repeat            Repeat
# Line 457  begin Line 457  begin
457              URL := FIndy.Response.Location;              URL := FIndy.Response.Location;
458            Until Item.ResponseCode <> 301;            Until Item.ResponseCode <> 301;
459            if Item.ResponseCode = 200 then begin            if Item.ResponseCode = 200 then begin
460              Item.ResponseCode := 206;                  foundPos := Pos( '<dt>', Item.Content ) + Length( '<dt>' );
461                  Item.Content := Copy( Item.Content, Pos( '<dt>', Item.Content ) + Length( '<dt>' ), Length( Item.Content ) );                  Item.Content := Copy( Item.Content, foundPos, Length( Item.Content ) );
462                foundPos := Pos( '</dl>', Item.Content );
463                If foundPos > 0 Then
464                            Item.Content := Copy( Item.Content, 1, foundPos - 1 );
465              Item.Content := StringReplace( Item.Content, '<dt>', '<>' + #13#10, [rfReplaceAll] );              Item.Content := StringReplace( Item.Content, '<dt>', '<>' + #13#10, [rfReplaceAll] );
466              Item.Content := StringReplace( Item.Content, '<a href="mailto:', '', [rfReplaceAll] );              Item.Content := StringReplace( Item.Content, '<a href="mailto:', '', [rfReplaceAll] );
467              Item.Content := StringReplace( Item.Content, '"><b>', '<>', [rfReplaceAll] );              Item.Content := StringReplace( Item.Content, '"><b>', '<>', [rfReplaceAll] );

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26