ギコナビ
Revisão | 728664c7d70d29e58092b33ba69a2a2e4ad187f1 (tree) |
---|---|
Hora | 2004-09-07 01:41:41 |
Autor | h677 <h677> |
Commiter | h677 |
したらばJBBS用の過去ログのコード追加
@@ -3,7 +3,7 @@ library ShitarabaJBBSPlugIn; | ||
3 | 3 | { |
4 | 4 | ShitarabaJBBSPlugIn |
5 | 5 | µ½çÎjbg |
6 | - $Id: ShitarabaJBBSPlugIn.dpr,v 1.29 2004/08/27 21:01:46 h677 Exp $ | |
6 | + $Id: ShitarabaJBBSPlugIn.dpr,v 1.30 2004/09/06 16:41:41 h677 Exp $ | |
7 | 7 | } |
8 | 8 | |
9 | 9 | uses |
@@ -636,6 +636,24 @@ begin | ||
636 | 636 | finally |
637 | 637 | downResult.Free; |
638 | 638 | end; |
639 | + end else if responseCode = 302 then begin | |
640 | + //http://jbbs.shitaraba.com/bbs/read.cgi/game/3477/1077473358/ | |
641 | + //http://jbbs.shitaraba.com/game/bbs/read.cgi?BBS=3477&KEY=1077473358 | |
642 | + //http://jbbs.shitaraba.com/game/3477/storage/1077473358.html | |
643 | + //ßO | |
644 | + uri := TIdURI.Create( ReadURL ); | |
645 | + uriList := TStringList.Create; | |
646 | + try | |
647 | + ExtractHttpFields( ['/', '?'], [], uri.Path, uriList ); | |
648 | + URL := uri.Protocol + '://' + uri.Host + | |
649 | + '/' + uriList[3] + '/' + uriList[4] + '/storage/' + uriList[ 5 ] + '.html'; | |
650 | + finally | |
651 | + uriList.Free; | |
652 | + uri.Free; | |
653 | + end; | |
654 | + uri := TIdURI.Create( ReadURL ); | |
655 | + Result := StorageDownload(uri.Path, uri.Document); | |
656 | + uri.Free; | |
639 | 657 | end else if responseCode = 304 then begin |
640 | 658 | Result := dsNotModify; |
641 | 659 | end; |
@@ -794,7 +812,7 @@ begin | ||
794 | 812 | end; |
795 | 813 | tmpHTML.Delete(i); |
796 | 814 | end; |
797 | - j := 0; | |
815 | + j := 0; | |
798 | 816 | for i := 0 to tmpHTML.Count - 1 do begin |
799 | 817 | tmpLine := AnsiLowerCase(tmpHTML[i]); |
800 | 818 | tS := AnsiPos('<dl>', tmpLine); |
@@ -915,31 +933,27 @@ begin | ||
915 | 933 | |
916 | 934 | if downResult.Count > 0 then begin |
917 | 935 | if FileExists( FilePath ) then |
918 | - logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite ) | |
919 | - else | |
920 | - logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite ); | |
936 | + DeleteFile(FilePath); | |
937 | + | |
938 | + logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite ); | |
921 | 939 | try |
922 | - logStream.Position := logStream.Size; | |
940 | + logStream.Position := 0; | |
923 | 941 | logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) ); |
924 | 942 | finally |
925 | 943 | logStream.Free; |
926 | 944 | end; |
927 | 945 | |
928 | - if Count = 0 then | |
929 | - // VK | |
930 | - Result := dsComplete | |
931 | - else | |
932 | - // ÇL | |
933 | - Result := dsDiffComplete; | |
946 | + // VK | |
947 | + Result := dsComplete; | |
934 | 948 | |
935 | - Size := Size + Length( downResult.Text ); | |
949 | + Size := Length( downResult.Text ); | |
936 | 950 | // CGI ©çͳµ¢útª¾çêÈ¢ÌÅ»ÝÉÝè |
937 | 951 | LastModified := Now; |
938 | 952 | |
939 | 953 | |
940 | 954 | |
941 | - NewReceive := Count + 1; | |
942 | - Count := Count + downResult.Count; | |
955 | + NewReceive := 1; | |
956 | + Count := downResult.Count; | |
943 | 957 | NewResCount := downResult.Count; |
944 | 958 | //http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1086710948/l100 |
945 | 959 | //http://jbbs.livedoor.com/game/1578/storage/1086710948.html |