Dumpin
12-24-2007, 12:57 PM
Gets text between selected tags from a html page and safes them to your include Map.
Website = the webpage you want to take from
BeginTag is the tag befor the text (<HTML>for example).
Endtag is the tag after the text (</HTML> for example).
NameOfFile is how you wanna call the file that gets safed.
program New;
var
A, P : string;
Text : TStringList;
B, E, L : integer;
{.Script Info:
# ScriptName = Function GetAndSafeWebText(BeginTag, EndTag, NameOfFile:string): boolean;
# Author = Dumpin
# Description = Gets text between selected tags from a html page and safes them to your include Map
# Version =
# Date = 24-12-07
# Comments = Website = the webpage you want to take from
BeginTag is the tag befor the text (<HTML>for example).
Endtag is the tag after the text (</HTML> for example).
NameOfFile is how you wanna call the file that gets safed.
/Script Info}
Function GetAndSafeWebText(WebSite, BeginTag, EndTag, NameOfFile:string): boolean;
begin
repeat
P := GetPage(Website);
A := between(BeginTag, EndTag, P);
Trim(A);
Text := TStringList.Create;
text.add(A);
SaveToFile(Text, AppPath + 'Websafes\'+NameOfFile+'.txt');
Result := true;
until(B = 0);
end;
begin
ClearDebug;
GetAndSafeWebText('http://www.runescape.com/','<title>', '</title>', 'Runescape');
writeln('succesfully safed');
end.
If you got questions, feel free to ask.
Website = the webpage you want to take from
BeginTag is the tag befor the text (<HTML>for example).
Endtag is the tag after the text (</HTML> for example).
NameOfFile is how you wanna call the file that gets safed.
program New;
var
A, P : string;
Text : TStringList;
B, E, L : integer;
{.Script Info:
# ScriptName = Function GetAndSafeWebText(BeginTag, EndTag, NameOfFile:string): boolean;
# Author = Dumpin
# Description = Gets text between selected tags from a html page and safes them to your include Map
# Version =
# Date = 24-12-07
# Comments = Website = the webpage you want to take from
BeginTag is the tag befor the text (<HTML>for example).
Endtag is the tag after the text (</HTML> for example).
NameOfFile is how you wanna call the file that gets safed.
/Script Info}
Function GetAndSafeWebText(WebSite, BeginTag, EndTag, NameOfFile:string): boolean;
begin
repeat
P := GetPage(Website);
A := between(BeginTag, EndTag, P);
Trim(A);
Text := TStringList.Create;
text.add(A);
SaveToFile(Text, AppPath + 'Websafes\'+NameOfFile+'.txt');
Result := true;
until(B = 0);
end;
begin
ClearDebug;
GetAndSafeWebText('http://www.runescape.com/','<title>', '</title>', 'Runescape');
writeln('succesfully safed');
end.
If you got questions, feel free to ask.