Use some simple, free http server software to make the files available for http requests locallytrekkie wrote:I've downloaded Covers for many movies and using Shift -F7 for
Each file is cumbersome. So i tried to write a script.
Programmation questions
Re: GetPicture with Local image files
-
- Posts: 744
- Joined: 2007-04-28 05:46:43
- Location: Italy
Re: GetPicture with Local image files
To resolve problems like yours viewtopic.php?t=4171 I Installed and used wampserver.trekkie wrote:Hello
Is There a Way to Import a picture from local hard disk files ?
Thanks in advance
It's free, easy and safe.
-
- Posts: 62
- Joined: 2009-11-12 05:53:14
[Resolved]small modification in IMDB script
Hi all,
i am a newbie and i need your help
I would like to put the rating in the MediaLabel field using the IMDB script but currently there is no such option.There is only the option to put in in the Media Type field.
The reason the MediaType field is not convenient is that if i set the rating there then number of votes are not visible.
So i tried to modify the script a little (cause i am not lazy) and put the rating to be stored in MediaLabel instead of MediaType.
So i went at the section of imdb script where rating is set and found two instances of MediaType (lines 596 and 597) which i substituted with MediaLabel as shown below:
Although it seemed logical for a newbie like me it seems it is not working as i get the message:
script error IMDB.unknown identifier FIELDMEDIALABEL at line 596
I dont know how to fix this (if it can be fixed) as from what i understand has to do with the declaration of medialabel variable,right?
Any help would be appreciated.
Thank you for your time reading this,
Regards,
The_Observer.
P.S. The reason i tried this although i am a newbie is because i read somewhere in here that it is not so hard to alter a little the code.Well if this is true then i am too newbie i guess Pls help.
=============================================
Ok ,i found it.
There was not variable MediaLabel as i originally thought.
As i found from the help of the program the correct name of the variable for MediaLabel field is Media.
So in case someone else might need it the code should be :
Probably piece of cake for someone experienced but breakthrough for me
As the song says , ...i am so excited ...
i am a newbie and i need your help
I would like to put the rating in the MediaLabel field using the IMDB script but currently there is no such option.There is only the option to put in in the Media Type field.
The reason the MediaType field is not convenient is that if i set the rating there then number of votes are not visible.
So i tried to modify the script a little (cause i am not lazy) and put the rating to be stored in MediaLabel instead of MediaType.
So i went at the section of imdb script where rating is set and found two instances of MediaType (lines 596 and 597) which i substituted with MediaLabel as shown below:
Code: Select all
if (GetOption('UserRatings') = 1) and (Value <> '') and (CanSetField(fieldMediaLabel)) then
SetField(fieldMediaLabel, Value);
script error IMDB.unknown identifier FIELDMEDIALABEL at line 596
I dont know how to fix this (if it can be fixed) as from what i understand has to do with the declaration of medialabel variable,right?
Any help would be appreciated.
Thank you for your time reading this,
Regards,
The_Observer.
P.S. The reason i tried this although i am a newbie is because i read somewhere in here that it is not so hard to alter a little the code.Well if this is true then i am too newbie i guess Pls help.
=============================================
Ok ,i found it.
There was not variable MediaLabel as i originally thought.
As i found from the help of the program the correct name of the variable for MediaLabel field is Media.
So in case someone else might need it the code should be :
Code: Select all
if (GetOption('UserRatings') = 1) and (Value <> '') and (CanSetField(fieldMedia)) then
SetField(fieldMedia, Value);
As the song says , ...i am so excited ...
Re: [Resolved]small modification in IMDB script
That's my fault But I can't change the name now. I could add a second identical variable MediaLabel, though.the_observer wrote: There was not variable MediaLabel as i originally thought.
As i found from the help of the program the correct name of the variable for MediaLabel field is Media.
Documentation?
Hi again.
Im trying to learn and play with amc scripting, already did a couple of custom scripts but using others scripts as examples of course.
Because I cant find any documetation about available functions for amc pascal scripts.
There is any?
Using the forum search is not very helpful. As examples (and questions):
- Searched for regexp support in amc and reading threads got that you said (5 years ago) that would be added in future versions. It was? cant find anything else.
- Tried to search about a way to get the image file size or dimensions after importing the image from internet. Some function for that?
Reading the img value tags of the page is not an option at all.
Dont know, there is something variable stored for the picture size that I can read back?
- Now im trying to extract the year digits from a webpage that could have randoms errors ( like (1996/s) (\1694) and so.
As regexp is not supported (?), there is some easy funcion available to identify digits in a string?
Yes I guess I can do some manual function like looking for the first number ("19" or "20") pos after the "(" and copying the next 4 characters to a new string and thats what I did for now, but what if (19/94) ?
removing specials characters also is not an option because as the first example, sometimes the errors include alpha chars between the parenthesis.
Thats all for now (only that? ) thanks for all this years of antp soft, man.
EDIT: ok right after posting this I found a hacky (very) way to solve the last question, about how to identify digits.
After trying to find a way to search/compare with a string array, this is the function I ended with:
its named and made specially to get a clear year string from a dirty imput string that can be something like "<a><b>1866<a/>etc" and/or directly take the string inside parenthesis if found and extract the digits.
But of course I will modify and use it for other "getdigits" or "getalphas" needings .
Im trying to learn and play with amc scripting, already did a couple of custom scripts but using others scripts as examples of course.
Because I cant find any documetation about available functions for amc pascal scripts.
There is any?
Using the forum search is not very helpful. As examples (and questions):
- Searched for regexp support in amc and reading threads got that you said (5 years ago) that would be added in future versions. It was? cant find anything else.
- Tried to search about a way to get the image file size or dimensions after importing the image from internet. Some function for that?
Reading the img value tags of the page is not an option at all.
Dont know, there is something variable stored for the picture size that I can read back?
- Now im trying to extract the year digits from a webpage that could have randoms errors ( like (1996/s) (\1694) and so.
As regexp is not supported (?), there is some easy funcion available to identify digits in a string?
Yes I guess I can do some manual function like looking for the first number ("19" or "20") pos after the "(" and copying the next 4 characters to a new string and thats what I did for now, but what if (19/94) ?
removing specials characters also is not an option because as the first example, sometimes the errors include alpha chars between the parenthesis.
Thats all for now (only that? ) thanks for all this years of antp soft, man.
EDIT: ok right after posting this I found a hacky (very) way to solve the last question, about how to identify digits.
After trying to find a way to search/compare with a string array, this is the function I ended with:
Code: Select all
//------------------------------------------------------------------------------
// returns the string with the year digits only
// clear_year := GetYear(string_with_year);
//------------------------------------------------------------------------------
function GetYear(str: string) :String;
var
i: integer;
res, pstr, po: string;
digits: TStringList;
begin
res := '';
digits := TStringList.Create;
digits.Text := '0' + #13#10 + '1' + #13#10 + '2' + #13#10 + '3'
+ #13#10 + '4' + #13#10 + '5' + #13#10 + '6' + #13#10 +
'7' + #13#10 + '8' + #13#10 + '9' + #13#10;
if (TextBetween(str, '(',')') <> '') then
str := TextBetween(str, '(',')');
for i := 1 to Length(str) do
begin
po := IntToStr(i);
pstr := Copy(str, i, 1);
if (FindLine(pstr, digits, 0) <> -1 ) then
res := res + pstr;
end;
result := res;
end;
But of course I will modify and use it for other "getdigits" or "getalphas" needings .
For documentation of AMC scripting functions you should have a look on AMC help file / Script files creation and for innerfuse pascal script documentation you could download AMC source code from http://www.antp.be/software/moviecatalog/sources , there is a ifps documentation for the script engine version used in AMC included (I think it is in main sources in ifps folder if I remember correct, start index.html there).
For the more specific questions you will have to wait for antp's answer
For the more specific questions you will have to wait for antp's answer
Done, downloaded the source and did some read to that ifps documentation (more like a quick 30 seconds search) but now Im used to search for functions on the source itself.bad4u wrote:For documentation of AMC scripting functions you should have a look on AMC help file / Script files creation and for innerfuse pascal script documentation you could download AMC source code from http://www.antp.be/software/moviecatalog/sources , there is a ifps documentation for the script engine version used in AMC included (I think it is in main sources in ifps folder if I remember correct, start index.html there).
For the more specific questions you will have to wait for antp's answer
Now I've installed Delphi 7 and sucefully set it for AMC compiling. So now im gonna start playing with that
-
- Posts: 744
- Joined: 2007-04-28 05:46:43
- Location: Italy
Going on with my work on kultvideo.it i found some pages (related to erotic movies, i think) that cannot be accessed without a precise positive answer in a form posted in html page.
I think it's ncessary to use POSTPAGE2 to access but I don't know how to use it (as you know, I'm a genius in copying from other people works but I'm a donkey if I need to resolve programmation's questions).
Would you help me?
Thanks in advance.
(look for 'Emmanuelle' and choose the first movie in list to see what I'm saying and find //fulvio in Kultvideo's script below)
I post my question here as I think someone else could be interested in learning how to use POSTPAGE2.
bye.
I think it's ncessary to use POSTPAGE2 to access but I don't know how to use it (as you know, I'm a genius in copying from other people works but I'm a donkey if I need to resolve programmation's questions).
Would you help me?
Thanks in advance.
(look for 'Emmanuelle' and choose the first movie in list to see what I'm saying and find //fulvio in Kultvideo's script below)
Code: Select all
(***************************************************
Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/
[Infos]
Authors=Fulvio53s03 based on original by Penanders (2006)
Title=Kultvideo
Description=Script per Kultvideo.it
Site=http://www.kultvideo.it
Language=IT
Version=2 - 2. 9.2010
Requires=3.5.1
Comments=Kultvideo offre poche informazioni, su film davvero introvabili
License=This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
GetInfo=1
[Options]
***************************************************)
program KultVideo;
uses
StringUtils7552;
var
MovieName, Pagestr: string;
//TheMovieAddress: string;
const
SITE = 'http://www.kultvideo.it/';
SITE1 = 'http://www.kultvideo.it/';
// SITE1 = 'http://www.kultvideo.it/scheda.asp';
// http://www.kultvideo.it/articles/ArticleSheet.aspx?__langG=it-IT&aid=7244
// ../articles/ArticleSheet.aspx?__langG=it-IT&aid=7244
// -- Formatta la stringa cercando le prime lettere rendendole maiuscole
function PrimeMaiu(str: string): string;
begin
str := AnsiLowerCase(str);
str := AnsiMixedCase(str, ' -/');
Result := str;
end;
// ---
procedure AnalyzePage(Address: string);
var
Page: TStringList;
LineNr: integer;
BeginPos: integer;
forceHTTP11: boolean;
forceEncodeParams: boolean;
begin
Page := TStringList.Create;
Page.Text := GetPage(Address);
Page.Text := UTF8Decode(Page.Text);
Pagestr := Page.Text;
LineNr := FindLine('Risultati della ricerca per i termini', Page, 0);
if LineNr = -1 then
begin
ShowError('Spiacente, nessun film trovato');
end
else // Trovati film ! Nota: possono esserci + pagine -> non ancora gestito !
begin
// Crea la lista di film
forceHTTP11 := true;
forceEncodeParams := true;
PickTreeClear;
PickTreeAdd('Risultati ricerca per "' + UrlDecode(MovieName) + '":', '');
AddMoviesTitles(Page);
if PickTreeExec(Address) then
begin
// <form name="aspnetForm" method="POST" action="ArticleSheet.aspx?__langG=it-IT&aid=2610" onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_btnSearch')" id="aspnetForm">
Page.Text := PostPage2(SITE, Address, content, BaseAddress, forceHTTP11, forceEncodeParams);
//fulvio <form name="fmAdultsOK" method="post" action="ArticleSheet.aspx">
<input type="hidden" name="aid" value='2610' />
<input type="hidden" name="adtst" id="adtst" value="1" />
</form>
//fulvio .
// <form action="search.php" method="post" enctype="application/x-www-form-urlencoded" name="search">
// <input name="search" type="text" size="16" maxlength="50">
// <input name="go" type="image" src="image/go.gif" usemap="go">
// </form>
//fulvio
// Page.Text := GetPage(Address); // Richiede la pagina del film
Page.Text := UTF8Decode(Page.Text);
Pagestr := Page.Text;
SetField(FieldUrl, Address);
//Page.savetofile('D:\Prova.txt');
AnalyzeMoviePage(Page); // Analizza la pagina del film
end;
end;
Page.Free;
end;
// ---
// Analisi ed estrazione dati dalla pagina del film
procedure AnalyzeMoviePage(Page: TStringList);
var
//Fine: Integer;
Line, Line2, Line3, Comm: string;
InitChar, EndChar, SaveNationYear: string;
LineNr: Integer;
BeginPos, EndPos: Integer;
Field: integer;
begin
//Debug
//Page.SaveToFile(PATHLOG+MovieName+'.film');
// data di estrazione dati
SetField(fieldDate, DateToStr(Date));
// Immagine
LineNr := FindLine('id="article_sheet_picture"', Page, 0);
//showmessage(intToStr(LineNR));
if LineNr>-1 then
begin
LineNr := LineNr + 1;
Line := Page.GetString(LineNr);
Line := TextBetween(Line, '<img src="../', '" width="');
if length(Line) > 0 then
begin
Line := SITE1 + Line;
setfield(fieldAudioFormat, Line);
GetPicture2(Line, GetField(FieldUrl));
end;
end;
// elimina caratteri x debug
// Cerca il titolo tradotto
InitChar := '<td align="left" valign="top" class="article_sheet_filmtitle">'; //tipo 1 http://www.kultvideo.it/articles/ArticleSheet.aspx?__langG=it-IT&aid=6821
BeginPos := Pos(InitChar, Pagestr);
Delete(Pagestr, 1, BeginPos - 1);
Line := '>' + TextBetween(Pagestr, InitChar, '<') + '<';
Line := TextBetween(Line, '>', '<');
HTMLRemoveTags(Line);
HTMLDecode(Line);
Line := Fulltrim(Line);
SetField(fieldTranslatedTitle, PrimeMaiu(Line) );
// SetField(fieldOriginalTitle, PrimeMaiu(Line) );
// Cerca il titolo originale
//<span class="article_sheet_subtitle">
//<span class="article_sheet_subtitle">
InitChar := '<span class="article_sheet_filmsubtitle">';
BeginPos := Pos(InitChar, Pagestr);
if BeginPos = 0 then
begin
InitChar := '<span class="article_sheet_subtitle">';
BeginPos := Pos(InitChar, Pagestr);
end;
Delete(Pagestr, 1, BeginPos - 1);
EndChar := '<';
LineNr := FindLine(InitChar, Page, 0);
Line := Page.GetString(LineNr);
InitChar := '>';
Line := InitChar + TextBetween(Line, '<span class="article_sheet_filmsubtitle">', EndChar) + EndChar;
Line := TextBetween(Line, '>', EndChar);
BeginPos := Pos(InitChar, Pagestr);
HTMLRemoveTags(Line);
HTMLDecode(Line);
Line := Fulltrim(Line);
Line := UTF8Decode(Line);
SetField(fieldOriginalTitle, PrimeMaiu(Line) );
Delete(Pagestr, 1, BeginPos - 1);
// Cerca nazionalità e anno
InitChar := '<td';
EndChar := '</td>';
Line := InitChar + Textbetween(Pagestr, InitChar, EndChar) + EndChar;
HTMLRemoveTags(Line);
HTMLDecode(Line);
Line := Fulltrim(Line); //'Francia (1987) - Colore'
SaveNationYear := Line;
Line := TextBefore(SaveNationYear, '(', '');
SetField(fieldCountry, PrimeMaiu(Trim(Line)));
// esempio: MovieName := TextBefore(MovieName, '[', '') + TextAfter(MovieName, ']');
Line := TextBetween(SaveNationYear, '(', ')');
SetField(fieldYear, Line);
// Cerca genere
InitChar := '<span class="article_sheet_datalabel">';
Line := Textbetween(Pagestr, InitChar, '</td>');
BeginPos := Pos(InitChar, Pagestr);
Delete(Pagestr, 1, BeginPos);
Line := stringreplace(Line, 'Genere:', '');
HTMLRemoveTags(Line);
HTMLDecode(Line);
Line := Fulltrim(Line);
SetField(fieldCategory, PrimeMaiu(Line));
// Cerca regia
InitChar := '<span class="article_sheet_datalabel">';
Line := Textbetween(Pagestr, InitChar, '</td>');
BeginPos := Pos(InitChar, Pagestr);
Delete(Pagestr, 1, BeginPos);
Line := stringreplace(Line, 'Regia:', '');
HTMLRemoveTags(Line);
HTMLDecode(Line);
Line := Fulltrim(Line);
SetField(fieldDirector, PrimeMaiu(Line));
// Cerca cast
InitChar := '<span class="article_sheet_datalabel">';
Line := Textbetween(Pagestr, InitChar, '</td>');
BeginPos := Pos(InitChar, Pagestr);
Delete(Pagestr, 1, BeginPos);
Line := stringreplace(Line, 'Cast:', '');
HTMLRemoveTags(Line);
HTMLDecode(Line);
Line := Fulltrim(Line);
SetField(fieldActors, PrimeMaiu(Line));
// Cerca distributore (al posto del produttore)
InitChar := '<span class="article_sheet_datalabel">';
Line := Textbetween(Pagestr, InitChar, '</td>');
BeginPos := Pos(InitChar, Pagestr);
Delete(Pagestr, 1, BeginPos);
// Line := stringreplace(Line, 'Cast:', '');
HTMLRemoveTags(Line);
HTMLDecode(Line);
Line := stringreplace(Line, crlf, '');
Line := stringreplace(Line, #09, '');
Line := Fulltrim(Line);
SetField(fieldProducer, Line);
// Cerca la durata
InitChar := '<span class="article_sheet_datalabel">Durata:'; //tipo 1 http://www.kultvideo.it/articles/ArticleSheet.aspx?__langG=it-IT&aid=6821
// InitChar := '<span class="article_sheet_datalabel">'; //tipo 2
Line := Textbetween(Pagestr, InitChar, '</td>');
BeginPos := Pos(InitChar, Pagestr);
Delete(Pagestr, 1, BeginPos);
Line := stringreplace(Line, 'Durata:', '');
HTMLRemoveTags(Line);
HTMLDecode(Line);
Line := Fulltrim(Line);
SetField(fieldLength, Line);
comm := '';
InitChar := 'Trama:</span>';
BeginPos := pos(Pagestr, InitChar);
Delete(Pagestr, 1, BeginPos);
Pagestr := Pagestr + InitChar;
Line := Textbetween(Pagestr, InitChar, '</td>');
HTMLRemoveTags(Line);
HTMLDecode(Line);
Line := stringreplace(Line, crlf, '');
Line := stringreplace(Line, #09, '');
Line := Fulltrim(Line);
SetField(fieldDescription, Line);
InitChar := '<span class="article_sheet_datalabel">';
Line := Textbetween(Pagestr, InitChar, '</td>');
BeginPos := Pos(InitChar, Pagestr);
Delete(Pagestr, 1, BeginPos);
HTMLRemoveTags(Line);
HTMLDecode(Line);
Line := stringreplace(Line, crlf, '');
Line := stringreplace(Line, #09, '');
Line := Fulltrim(Line);
// Comm := Comm + Line + crlf;
SetField(fieldComments, Comm);
end;
// ---
// Riempie la lista con i film trovati
procedure AddMoviesTitles(Page: TStringList);
var
LineNr, Linesup: Integer;
Line, Supporto: string;
MovieTitle, MovieAddress: string;
BeginPos, EndPos: Integer;
Pagina: TStringList;
begin
//TheMovieAddress := '*';
LineNr := 0;
LineNr := FindLine('<div class="artlist_artpicture">', Page, LineNr);
// LineSup := LineNr;
While LineNR <> -1 Do
Begin
// LineNr := 0;
If LineNR = -1 Then Break;
//Showmessage(intToStr(LineNr));
Line := Page.GetString(LineNr);
// Crea l'url per la pagina completa del film
LineNr := LineNr + 1;
Line := Page.GetString(LineNr);
//Showmessage(line);
MovieAddress := TextBetween(Line, '<a href="../', '"><img src="');
MovieAddress := SITE1 + MovieAddress;
//ShowMessage(MovieAddress);
Page.SetString(lineNR, ' ');
//Estrazione Tipo supporto
Linesup := FindLine('src="../img/entities/articletype/', Page, Linesup);
Supporto := Page.GetString(Linesup);
Linesup := LineSup + 1;
//Decodifica il supporto
Supporto := TextBetween(Supporto, 'articletype/', '"');
if supporto = '1_1a.jpg' then supporto := ' (dvd)';
if supporto = '2_1a.jpg' then supporto := ' (BluRay)';
if supporto = '4_1a.gif' then supporto := ' (VHS)';
if (supporto = '10_1a.jpg') or (supporto = '15_1a.jpg')or (supporto = '18_1a.jpg') then
supporto := ' (poster)';
//Estrazione Titolo film
LineNr := FindLine('<td class="artlist_arttitle">', Page, LineNr);
LineNr := LineNr + 1;
MovieTitle := Page.GetString(LineNr);
//ShowMessage(MovieTitle);
//Ripulisce il titolo
HTMLRemoveTags(MovieTitle);
HTMLDecode(MovieTitle);
MovieTitle := Fulltrim(MovieTitle);
HTMLRemoveTags(MovieTitle);
HTMLDecode(MovieTitle);
MovieTitle := Fulltrim(MovieTitle) + Supporto;
// Controlla se ci sono altre pagine di risultati
//LineNr := FindLine('Pagina Successiva',Page,0);
// if LineNr<>-1 then
// begin
// idx := idx+1;
// end;
//Line := Page.GetString(LineNr);
// Estrae l'URL della pagina successiva
//BeginPos := pos('href="', Line)+5;
//Delete( Line, 1, BeginPos);
//BeginPos := 1;
//EndPos := pos('"', Line);
//Line := SITE1 + copy(Line, BeginPos, endPos-BeginPos);
//ShowMessage(Line);
// Richiama la pagina successiva e la analizza
//Page.text := GetPage(Line);
//Page.Text := UTF8Decode(Page.Text);
//Pagestr := Page.Text;
// Debug
//Page.SaveToFile(PATHLOG+MovieName+'.res'+IntToStr(idx));
//Page.LoadFromFile(PATHLOG+MOVIE+'.res');
PickTreeAdd(MovieTitle, MovieAddress);
LineNr := FindLine('<div class="artlist_artpicture">', Page, LineNr);
end;
end;
// ----- main()
Var
TempVar: String;
begin
if CheckVersion(3,5,1) then
begin
MovieName := GetField(fieldtranslatedTitle);
if MovieName = '' then
MovieName := GetField(fieldTranslatedTitle);
if Input('KultVideo.it', 'Inserire il nome del film:', MovieName) then
begin
MovieName := UrlEncode(MovieName);
// TempVar:='http://www.kultvideo.it/cerca.asp?page=1&Genre=&key=&cerca='+UrlEncode(MovieName)+'&tipocerca=titolo&radiobutton=ALL';
TempVar:='http://www.kultvideo.it/search/Search.aspx?st=' + MovieName;
SetField(fieldURL, Tempvar); // Memorizza il campo URL
analyzepage(TempVar);
end;
end else
ShowMessage('This script requires a newer version of Ant Movie Catalog (at least the version 3.5.1)');
end.
bye.
-
- Posts: 744
- Joined: 2007-04-28 05:46:43
- Location: Italy
Why do you need postpage2 over postpage, actually?
and why postpage? The search seems to be done directly in the url (which means it works with getpage)
e.g. http://www.kultvideo.it/search/Search.aspx?st=stella
and why postpage? The search seems to be done directly in the url (which means it works with getpage)
e.g. http://www.kultvideo.it/search/Search.aspx?st=stella
-
- Posts: 744
- Joined: 2007-04-28 05:46:43
- Location: Italy
Not for every movie, I see
Take a look to
(http://www.kultvideo.it/search/Search.a ... dolescenza) and select the first movie shown (Adolescenza perversa).
I was thinking to use Postpage2 as I saw in those pages that the url to be opened was called using a form
and forms can be treated by PostPage2 (or maybe even by Postpage) ?
Am I wrong?
Thnx.
Take a look to
(http://www.kultvideo.it/search/Search.a ... dolescenza) and select the first movie shown (Adolescenza perversa).
I was thinking to use Postpage2 as I saw in those pages that the url to be opened was called using a form
Code: Select all
onclick="document.forms.fmAdultsOK.submit()
Am I wrong?
Thnx.
-
- Posts: 744
- Joined: 2007-04-28 05:46:43
- Location: Italy
-
- Posts: 744
- Joined: 2007-04-28 05:46:43
- Location: Italy
antp wrote:...if you check other scripts using it, it should be easy
Code: Select all
paramOK := '&adtst=1';
Page.Text := PostPage(Address, paramOK);
let's go on!
So i'm a total newbie at this, but wanted to find out how to add a space between the producers in the DVDEmpire Script. As of now, the script lists producers names like: soandso,soandso,soandso, and I would like it to look like soandso, soandso, soandso. The producers portion of the DVDEmpire script looks like this:
// Producers
LineNr := FindLine('<b>Producers:</b>', Page, 0);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr);
Line := TextBetween(Line, '<b>Producers:</b>', '<b>Directors:</b>');
Value := GetValues(Line, true);
SetField(fieldProducer, Value);
end;
Thanks for any help and patience!
// Producers
LineNr := FindLine('<b>Producers:</b>', Page, 0);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr);
Line := TextBetween(Line, '<b>Producers:</b>', '<b>Directors:</b>');
Value := GetValues(Line, true);
SetField(fieldProducer, Value);
end;
Thanks for any help and patience!
burn913, the part that you want to change is actually in the GetValues function of the script. All you have to do is add a space after the comma in this part:
change to
This actually makes it look a little cleaner. I'll probably include it in my next update.
Code: Select all
if (UseCommaDelimiter) then
Delimiter := ','
Code: Select all
if (UseCommaDelimiter) then
Delimiter := ', '