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.20 by h677, Sat Dec 13 09:52:48 2003 UTC revision 1.21 by yoffy, Sun Mar 7 12:56:13 2004 UTC
# Line 487  begin Line 487  begin
487                                          end;                                          end;
488                                  end;                                  end;
489    
                                 {$IFDEF DEBUG}  
                                 if (Item.DownType = gdtThread) and (Item.ResponseCode = 302) then begin  
                                         ATitle := Item.ThreadItem.Title;  
                                         if ATitle = '' then  
                                                 ATitle := '(名称不明)';  
                                         FMsg := '★過去ログ(1)が存在しないためgoogleキャッシュから探します - [' + ATitle + ']';  
                                         FIcon := gmiWhat;  
                                         if Assigned(OnDownloadMsg) then  
                                                 Synchronize(FireDownloadMsg);  
                                         URL := 'http://www.google.co.jp/search?q=cache:' + Item.ThreadItem.URL;  
                                         URL := StringReplace( URL, 'l50', '', [rfReplaceAll] );  
                                         Modified := Item.ThreadItem.LastModified;  
                                         Repeat  
                                                 if not CgiDownload(Item.DownType, URL, Modified) then  
                                                         Item.State := gdsError;  
                                                 URL := FIndy.Response.Location;  
                                         Until Item.ResponseCode <> 301;  
                                         if Item.ResponseCode = 200 then begin  
                                                 foundPos := Pos( '<dt>', Item.Content ) + Length( '<dt>' );  
                                                 Item.Content := Copy( Item.Content, foundPos, Length( Item.Content ) );  
                                                 foundPos := Pos( '</dl>', Item.Content );  
                                                 If foundPos > 0 Then  
                                                         Item.Content := Copy( Item.Content, 1, foundPos - 1 );  
                                                 Item.Content := StringReplace( Item.Content, '<dt>', '<>' + #13#10, [rfReplaceAll] );  
                                                 Item.Content := StringReplace( Item.Content, '<a href="mailto:', '', [rfReplaceAll] );  
                                                 Item.Content := StringReplace( Item.Content, '"><b>', '<>', [rfReplaceAll] );  
                                                 Item.Content := StringReplace( Item.Content, '<b>', '<>', [rfReplaceAll] );  
                                                 Item.Content := StringReplace( Item.Content, '</b></a>', '<>', [rfReplaceAll] );  
                                                 Item.Content := StringReplace( Item.Content, '</b>', '<>', [rfReplaceAll] );  
                                                 Item.Content := StringReplace( Item.Content, '<dd>', '<>', [rfReplaceAll] );  
                                         end;  
                                 end;  
                                 {$ENDIF}  
   
490                                  case Item.ResponseCode of                                  case Item.ResponseCode of
491                                          200: Item.State := gdsComplete;                                          200: Item.State := gdsComplete;
492                                          206: Item.State := gdsDiffComplete;                                          206: Item.State := gdsDiffComplete;

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

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