{
ShitarabaJBBSPlugIn
\82µ\82½\82ç\82Î\8f\88\97\9d\83\86\83j\83b\83g
- $Id: ShitarabaJBBSPlugIn.dpr,v 1.24 2004/08/02 16:01:14 h677 Exp $
+ $Id: ShitarabaJBBSPlugIn.dpr,v 1.25 2004/08/07 12:55:48 h677 Exp $
}
uses
MAJOR_VERSION = 1;
MINOR_VERSION = 1;
RELEASE_VERSION = 'alpha';
- REVISION_VERSION = 2;
+ REVISION_VERSION = 3;
SYNCRONIZE_MENU_CAPTION = '\82µ\82½\82ç\82ÎJBBS\94Â\8dX\90V';
uri : TIdURI;
uriList : TStringList;
foundPos : Integer;
- i : Integer;
+// i : Integer;
const
BBS_HOST_1 = 'jbbs.shitaraba.com';
BBS_HOST_2 = 'jbbs.livedoor.com';
end;
end;
//Title := tmpTitle;
- tS := 0; tE := 0;
+ //tS := 0; tE := 0;
//\96{\95¶\82Ì\8eæ\93¾ <DL>\82Ì\8e\9f\82Ì\8ds\82©\82ç</DL>\82Ì\91O\82Ì\8ds\82Ü\82Å
for i := tmpHTML.Count - 1 downto 0 do begin
tmpLine := AnsiLowerCase(tmpHTML[i]);
var
uri : TIdURI;
uriList : TStringList;
+ tmphost: String;
begin
uri := TIdURI.Create( ReadURL );
uriList := TStringList.Create;
try
ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
+
+ tmphost := uri.Host;
+
+ if tmphost = 'jbbs.livedoor.com' then
+ tmphost := 'jbbs.shitaraba.com';
+
if( AnsiPos('.html', uri.Document) = 0 ) then begin //\92Ê\8fí
FileName := uriList[ 5 ] + '.dat';
+ // http://jbbs.livedoor.com/bbs/read.cgi/computer/351/1090404452/l100
// http://jbbs.shitaraba.com/bbs/read.cgi/game/1578/1067968274/l100
// http://jbbs.shitaraba.com/game/1000/subject.txt
Result := CreateResultString(
- uri.Protocol + '://' + uri.Host + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' );
+ uri.Protocol + '://' + tmphost + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' );
end else begin
//http://jbbs.shitaraba.com/game/1578/storage/1086710948.html
Result := CreateResultString(
- uri.Protocol + '://' + uri.Host + CustomStringReplace(uri.Path, '/storage', ''));
+ uri.Protocol + '://' + tmphost + CustomStringReplace(uri.Path, '/storage', ''));
end;
finally
uri : TIdURI;
uriList : TStringList;
foundPos : Integer;
- dir : string;
+ dir, tmphost : string;
begin
foundPos := AnsiPos( '?', URL );
try
ExtractHttpFields( ['/'], [], uri.Path, uriList );
dir := uriList[ 1 ];
+
+ tmphost := uri.Host;
+ if tmphost = 'jbbs.livedoor.com' then
+ tmphost := 'jbbs.shitaraba.com';
+
ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList );
Result :=
- uri.Protocol + '://' + uri.Host + '/bbs/read.cgi/' +
+ uri.Protocol + '://' + tmphost + '/bbs/read.cgi/' +
dir + '/' + uriList.Values[ 'BBS' ] + '/' + uriList.Values[ 'KEY' ] + '/l100';
finally
uri.Free;
uriList := TStringList.Create;
try
ExtractHttpFields( ['/'], [], uri.Path, uriList );
+
+ tmphost := uri.Host;
+ if tmphost = 'jbbs.livedoor.com' then
+ tmphost := 'jbbs.shitaraba.com';
+
if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin
Result :=
- uri.Protocol + '://' + uri.Host + THREAD_MARK + '/' +
+ uri.Protocol + '://' + tmphost + THREAD_MARK + '/' +
uriList[ 3 ] + '/' + uriList[ 4 ] + '/' + uriList[ 5 ] + '/l100';
end else if AnsiPos(THREAD_MARK, URL) = 0 then begin
//\83R\83R\82Å\89ß\8b\8e\83\8d\83O\82©\82Ç\82¤\82©\83`\83F\83b\83N\81H
if(AnsiPos('.html/', uri.Path) > 0) then begin
- Result := uri.Protocol + '://' + uri.Host + Copy(uri.Path, 1, Length(uri.Path) - 1);
+ Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1);
end else
Result := URL;
end;
uri : TIdURI;
uriList : TStringList;
foundPos : Integer;
- dir : string;
+ dir, tmphost : string;
begin
foundPos := AnsiPos( '?', URL );
try
ExtractHttpFields( ['/'], [], uri.Path, uriList );
dir := uriList[ 1 ];
+
+ tmphost := uri.Host;
+ if tmphost = 'jbbs.livedoor.com' then
+ tmphost := 'jbbs.shitaraba.com';
+
ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList );
// http://jbbs.shitaraba.com/bbs/read.cgi?DIR=game&BBS=1578&KEY=1067968274
Result :=
- uri.Protocol + '://' + uri.Host + '/bbs/rawmode.cgi/' +
+ uri.Protocol + '://' + tmphost + '/bbs/rawmode.cgi/' +
dir + '/' + uriList.Values[ 'BBS' ] + '/' + uriList.Values[ 'KEY' ] + '/';
finally
uri.Free;
uriList := TStringList.Create;
try
ExtractHttpFields( ['/'], [], uri.Path, uriList );
+
+ tmphost := uri.Host;
+ if tmphost = 'jbbs.livedoor.com' then
+ tmphost := 'jbbs.shitaraba.com';
// http://jbbs.shitaraba.com/bbs/read.cgi/game/1578/1067968274/l100
if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin
Result :=
- uri.Protocol + '://' + uri.Host + '/bbs/rawmode.cgi/' +
+ uri.Protocol + '://' + tmphost + '/bbs/rawmode.cgi/' +
uriList[ 3 ] + '/' + uriList[ 4 ] + '/' + uriList[ 5 ] + '/';
end else if AnsiPos(THREAD_MARK, URL) = 0 then begin
//\83R\83R\82Å\89ß\8b\8e\83\8d\83O\82©\82Ç\82¤\82©\83`\83F\83b\83N\81H
if(AnsiPos('.html/', uri.Path) > 0) then begin
- Result := uri.Protocol + '://' + uri.Host + Copy(uri.Path, 1, Length(uri.Path) - 1);
+ Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1);
end else
Result := URL;
end;