Personal Video Database
English => Development => Scripts and Templates => Topic started by: pra15 on February 08, 2015, 06:58:17 pm
-
Hello,
I would like to make a script for allocine.fr.
I thought make two script because info are in different page.
The first script give the link of the movie and when we have it, use this link in a second scipt to take info from actors or image.
I started to make the first script (attached).
In Allocine.fr the page of result to a search of movie give several results, but it seems i can't obtain more than one result in my prList.
In The Code of the page we can see all the movies but it seems they are hide for the script exept the first.
I know nothing about HTML programming. If someone can explain That!
</span> <!-- /fs11 -->
</div></div></td></tr>
Probably it's after this (in red in the code page).
I stop the code because in the page of casting it's the same principle and if we can't resolve this..........
N.B: I tried different boucles.... Erase in the script because don't work.
I tried to Pos('Second movie') give 0.
This script has now been released and is available via the program's auto-update system. Run Help > Check for updates and choose Allocine.fr from the list.
-
Try this code
procedure ParseSearchResults(HTML: string);
Var
CurPos, EndPos, EndSearch, nbResult, PosEssai1, PosEssai2 : Integer;
Year, MovieURL, ThumbURL, Title : String;
Begin
NbResult := 0;
CurPos := Pos('Films</h2>',HTML);
If CurPos < 1 then
Exit;
//Addresse Thumbnail :
CurPos := PosFrom('src=',HTML,CurPos)+5;
EndPos := PosFrom('.jpg',HTML,CurPos)+4;
ThumbURL := Trim(Copy(HTML,CurPos,EndPos-CurPos));
//Addresse page Film :
//CurPos := PosFrom('<a href=',HTML,EndPos);
CurPos := PosFrom('<a href=',HTML,CurPos);
//while curPos > 0 do begin
while (curPos > 0) AND (curPos < PosFrom('<button class="buttonform" type="submit">Rechercher</button>', HTML, endPos)) do begin
EndPos := PosFrom('.html',HTML,CurPos);
MovieURL := BASE_URL + Trim(Copy(HTML,CurPos+9,EndPos-CurPos-4));
//Nom Film :
CurPos := PosFrom('>',HTML,EndPos)+1;
EndPos := PosFrom('<br />',HTML,CurPos);
Title := Copy(HTML,CurPos,EndPos-CurPos);
Title := StringReplace(Title,'<b>','',True,True,True);
Title := StringReplace(Title,'</b>','',True,True,True);
Title := StringReplace(Title,'</a>',' (fr) / ',True,True,True);
LogMessage('Titre Recherche: ' + Title);
//Année :
CurPos := PosFrom('<span class="fs11">',HTML,EndPos);
if Curpos > 0 then begin
//Curpos := Curpos + 19;
//EndPos := PosFrom('<br />',HTML,CurPos);
//Year := Copy(HTML,CurPos,EndPos-CurPos);
Year := TextBetween(HTML, '<span class="fs11">', '<br />', True, CurPos);
LogMessage('Annee: ' + Year);
end else begin
Year := '';
curPos := endPos;
end;
//Ajout du film dans la liste des résultats :
AddSearchResult(Title,'', Year, MovieURL, ThumbURL);
//Addresse Thumbnail :
CurPos := PosFrom('src=',HTML,CurPos)+5;
EndPos := PosFrom('.jpg',HTML,CurPos)+4;
ThumbURL := Trim(Copy(HTML,CurPos,EndPos-CurPos));
CurPos := PosFrom('<a href=',HTML,CurPos);
end;
End;
it should work, at least for me it worked.
-
No, i'm just tryingit but i have just one movie in my windows result prlistImage while in the site there are several movies.
I try with word "anneaux".
-
No, i'm just tryingit but i have just one movie in my windows result prlistImage while in the site there are several movies.
I try with word "anneaux".
With word "anneaux" for me work is OK. See the attached image.
-
Thanks, yes it works.
After several trying i've forgotten erase manually original title, sorry.
-
Thanks, yes it works.
After several trying i've forgotten erase manually original title, sorry.
OK, no problem, nice to hear that it has been successfully solved the problem.
-
I've looked your modifications.
I don't understand why at the end of the boucle while, just put CurPos := PosFrom('<a href=',HTML,CurPos); doesn't work. We must return to Thumbnail address.
Sorry, i would like understand to not repeat the same error the next times.
And do you know some links for help to string function like StringReplace, TextBetween, RemoveTags, especially for boolean options. I put always true but some like wholeword, dolinebreaks, i'm not sure.
I'm not sure too to the language use in script. Pascal Delphi? Some function for pascal doesn't work in script.
I think it's important for a beginner to know where find help to make a script especially in the language use. Not just copy existing scripts and trying to addapt them.
-
And do you know some links for help to string function like StringReplace, TextBetween, RemoveTags, especially for boolean options. I put always true but some like wholeword, dolinebreaks, i'm not sure.
Unfortunately, I know only this Personal Video Database Scripting Manual (http://www.videodb.info/help/hlp_scripting.html) connection, if anything helps.
-
Thanks for the link but i've already readed it, it's more for the language i need help.
I add :
CustomField Nationalite (as multiple choice), Note Presse (as short text), Note Spectateurs (as short text).
I put too Note Press in standard field Note in PVD.
But ..... Problems with french characters : é è à etc....
ex : é replace by é
I tried to use function stringreplace but nothing change!
-
But ..... Problems with french characters : é è à etc....
ex : é replace by é
I tried to use function stringreplace but nothing change!
Try this UTF-8 encoding table and Unicode characters (http://www.utf8-chartable.de/unicode-utf8-table.pl?number=1024&utf8=-&unicodeinhtml=dec) connection, if anything helps.
It could also, this dmm.co.jp (http://www.videodb.info/download.php?ftype=0&file=dmmscript.zip) script that shows how to solve a similar problem.
-
Ok thanks,
I change CODE_PAGE in 65001 Unicode utf 8, it's good for the moment.
-
Change some errors exeptions in parsesearchresults
-
Change some errors exeptions in parsesearchresults
Thanks to the new version, but now I procedure ParseSearchResults almost 99% of search this codeprocedure ParseSearchResults(HTML: string);
Var
CurPos, EndPos, EndSearch, nbResult, PosEssai1, PosEssai2 : Integer;
Year, MovieURL, ThumbURL, Title : String;
Begin
NbResult := 0;
CurPos := Pos('Films</h2>',HTML);
If CurPos < 1 then
Exit;
CurPos := PosFrom('<div class="vmargin10t">',HTML,CurPos);
//Addresse Thumbnail :
CurPos := PosFrom('src=',HTML,CurPos)+5;
EndPos := PosFrom('alt=',HTML,CurPos)-2;
ThumbURL := Trim(Copy(HTML,CurPos,EndPos-CurPos));
//Addresse page Film :
CurPos := PosFrom('<a href=',HTML,CurPos)+9;
while (curPos > 0) AND (curPos < PosFrom('>1</em></li><li', HTML, endPos)) do begin
//while (curPos > 0) AND (curPos < PosFrom('<button class="buttonform" type="submit">Rechercher</button>', HTML, endPos)) do begin
EndPos := PosFrom('.html',HTML,CurPos)+5;
MovieURL := BASE_URL + Trim(Copy(HTML,CurPos,EndPos-CurPos));
Logmessage('MovieURL : ' + MovieURL);
//Nom Film :
CurPos := PosFrom('>',HTML,EndPos)+1;
EndPos := PosFrom('<br />',HTML,CurPos);
Title := Copy(HTML,CurPos,EndPos-CurPos);
Title := StringReplace(Title,'<b>','',True,True,True);
Title := StringReplace(Title,'</b>','',True,True,True);
Title := StringReplace(Title,'</a>',' / ',True,True,True);
LogMessage('Titre Recherche: ' + Title);
//Année :
CurPos := PosFrom('<span class="fs11">',HTML,EndPos);
if Curpos > 0 then begin
Year := TextBetween(HTML, '<span class="fs11">', '<br />', True, CurPos);
LogMessage('Annee: ' + Year);
end else begin
Year := '';
curPos := endPos;
end;
//Ajout du film dans la liste des résultats :
AddSearchResult(Title,'', Year, MovieURL, ThumbURL);
//Addresse Thumbnail :
CurPos := PosFrom('src=',HTML,CurPos)+5;
EndPos := PosFrom('alt=',HTML,CurPos)-2;
ThumbURL := Trim(Copy(HTML,CurPos,EndPos-CurPos));
LogMessage('ThumbURL :' + ThumbURL);
CurPos := PosFrom('<a href=',HTML,CurPos)+9;
end;
End;
can not find the results, while me with this codeprocedure ParseSearchResults(HTML: string);
Var
CurPos, EndPos, EndSearch, nbResult, PosEssai1, PosEssai2 : Integer;
Year, MovieURL, ThumbURL, Title : String;
Begin
NbResult := 0;
CurPos := Pos('Films</h2>',HTML);
If CurPos < 1 then
Exit;
CurPos := PosFrom('<div class="vmargin10t">',HTML,CurPos);
//Addresse Thumbnail :
CurPos := PosFrom('src='+#39,HTML,CurPos);
EndPos := PosFrom('alt='+#39,HTML,CurPos);
ThumbURL := Trim(Copy(HTML,CurPos+5,EndPos-CurPos-7));
//Addresse page Film :
CurPos := PosFrom('<a href=',HTML,CurPos)+9;
//while (curPos > 0) AND (curPos < PosFrom('>1</em></li><li', HTML, endPos)) do begin
while (curPos > 0) AND (curPos < PosFrom('<button class="buttonform" type="submit">Rechercher</button>', HTML, endPos)) do begin
EndPos := PosFrom('.html',HTML,CurPos)+5;
MovieURL := BASE_URL + Trim(Copy(HTML,CurPos,EndPos-CurPos));
Logmessage('MovieURL : ' + MovieURL);
//Nom Film :
CurPos := PosFrom('>',HTML,EndPos)+1;
EndPos := PosFrom('<br />',HTML,CurPos);
Title := Copy(HTML,CurPos,EndPos-CurPos);
Title := StringReplace(Title,'<b>','',True,True,True);
Title := StringReplace(Title,'</b>','',True,True,True);
Title := StringReplace(Title,'</a>',' / ',True,True,True);
LogMessage('Titre Recherche: ' + Title);
//Année :
CurPos := PosFrom('<span class="fs11">',HTML,EndPos);
if Curpos > 0 then begin
Year := TextBetween(HTML, '<span class="fs11">', '<br />', True, CurPos);
LogMessage('Annee: ' + Year);
end else begin
Year := '';
curPos := endPos;
end;
//Ajout du film dans la liste des résultats :
AddSearchResult(Title,'', Year, MovieURL, ThumbURL);
//Addresse Thumbnail :
CurPos := PosFrom('src='+#39,HTML,CurPos);
EndPos := PosFrom('alt='+#39,HTML,CurPos);
ThumbURL := Trim(Copy(HTML,CurPos+5,EndPos-CurPos-7));
LogMessage('ThumbURL :' + ThumbURL);
CurPos := PosFrom('<a href=',HTML,CurPos)+9;
end;
End;
in 99% it finds search results for movie titles.
I think it will be necessary to keep this below ParseSearchResults procedure, because this really works, at least for me it works on about 20 movie titles that I've tested.
Even in Nationalité Allociné, Note Presse and Note Spectateurs code is a lot of false data transfers, add some movie titles with errors in data transmission:
Note Presse
American Pie Presents Band Camp
American Pie Presents: Beta House
American Pie Presents: The Book of Love
American Pie Presents: The Naked Mile
Apaches Rifles
http://www.allocine.fr/film/fichefilm_gen_cfilm=44222.html
Note Presse and Note Spectateurs
Canciones de amor en Lolita's club
http://www.allocine.fr/film/fichefilm_gen_cfilm=134873.html
Casualties of Love: The Long Island Lolita Story
http://www.allocine.fr/film/fichefilm_gen_cfilm=211875.html
Children of Invention
http://www.allocine.fr/film/fichefilm_gen_cfilm=142444.html
Lota
http://www.allocine.fr/film/fichefilm_gen_cfilm=230014.html
Nationalité Allociné
The Shooting of Dan McGoo
http://www.allocine.fr/film/fichefilm_gen_cfilm=170340.html
The Shooting of Thomas Hurndall
http://www.allocine.fr/film/fichefilm_gen_cfilm=178138.html
Who - The Kids Are Alright
http://www.allocine.fr/film/fichefilm_gen_cfilm=169939.html
-
Thanks, i'll see that, but for the moment i'm not sure of the structure of my script. Just one script, not two. I look up the allmovie script for ideas. It's not simple with several page and especially for image (several images in several pages).
Once the structure will be good, i'll can concentrate for search data.
-
Sorry, i'm totally blocked;
i've tried to make an other script (only one) based on allmovie.
My problem is with the photos;
There is a principal page with list of all image, then we must (for each image) go to an other page to got the link of the image.
In My script i go to the first page and put the links of seconds pages in a array.
But during execution of the script i can't get to the second page, the mode change to ModePrephoto (Principal page where is the list of the image) to mode finished.
I try to put condition in getdownloadURL, or in NextMode but it seems doesn't work.
-
Sorry, i'm totally blocked;
i've tried to make an other script (only one) based on allmovie.
My problem is with the photos;
There is a principal page with list of all image, then we must (for each image) go to an other page to got the link of the image.
In My script i go to the first page and put the links of seconds pages in a array.
But during execution of the script i can't get to the second page, the mode change to ModePrephoto (Principal page where is the list of the image) to mode finished.
I try to put condition in getdownloadURL, or in NextMode but it seems doesn't work.
Unfortunately, here I am powerless, I can not help it.
My opinion in this matter is the following, movie poster yes to transfer, the rest well, not to transfer.
-
I found a solution for image.
I put links of image page in extralinks and put links of image in array and at the end i just use addimageurl for all data of the array.
Again a lot of error, in count ... dimension of array but it's possible.
I use this page as exemple http://www.allocine.fr/film/fichefilm_gen_cfilm=29007.html
-
It's better like this, less some errors.
Just one thing, when you choose number of photo to download (nMaxPhotos) add +1 to the number choosed (if you want 3 write 4).
The affiche was download as poster and photo in screenshots.
To be tested for others errors.
Thanks for parsesearchresults of Ivek23 it seems to work good.
-
Add data from first page, Title,Dates, Duree, Genre, Nationalite, Notes.
Correction of errors of pages shown by Ivek23 (up message).
Now i'll make data from casting page.
-
Add info from page casting :
Actors,Directors,Writers,Producers,composers,studio.
+ all (technique.....) in a customfield 'General Info' (memo).
-
Very, very nice, remarkable and impressive work. Congratulations for this script. It needs to be just edit it to work faster, on version 0.9.9.21 also works well, but more slowly, it may be functioning can be a bit faster.
Thanks for good work.
-
Add info from page 'secrets de tournage' in a custom field name 'Secrets' type memo.
-
It needs to be just edit it to work faster, on version 0.9.9.21 also works well, but more slowly, it may be functioning can be a bit faster.
This is slow pauseBeforeLoad = 2000; // Pause before loading (in millisecond)
but, this is more faster pauseBeforeLoad = 10; // Pause before loading (in millisecond)
Without the transfer of posters or screenshots const
pauseBeforeLoad = 2000; // Pause before loading (in millisecond)
nMaxAffiches = 0; // Nombre Maximum d'affiches a télécharger
nMaxPhotos = 0; //Add +1 // Nombre Maximum de photos a telecharger
nMaxImages = nMaxAffiches + nMaxPhotos;
script works fine, but if the settings such as const
pauseBeforeLoad = 2000; // Pause before loading (in millisecond)
nMaxAffiches = 2; // Nombre Maximum d'affiches a télécharger
nMaxPhotos = 1; //Add +1 // Nombre Maximum de photos a telecharger
nMaxImages = nMaxAffiches + nMaxPhotos;
PVD program will be blocked for the next movie connections:
http://www.allocine.fr/film/fichefilm_gen_cfilm=36095.html
http://www.allocine.fr/film/fichefilm_gen_cfilm=5180.html
http://www.allocine.fr/film/fichefilm_gen_cfilm=4276.html
Is given to reproduce this problem.
-
Yes i put pausebeforeload until script was finished because i make many test and sometimes allocine block.
Now i work in Awards Page, i want to make 3 while overlapping but i'm not even found the solution.
There's also a problem with image, when just one image on site cause an error. It'll see that later after finished Page awards.
-
Thanks,
Add AWARDS Page, but i'm blocked for the name in the last Festival of the page. My head will explose. I need help.
I have seen the links up for images, i understand why an error. There is no number of image in the movie page. I use this number to reserve number of extralinks for image. I'll see how resolve this.
I don't understand this :
If i put 7 extralinks (with images): the download start at the end of n°6 and the seven is not downloaded. If the seven is empty ---> error. It's that for this when there is only one image on site there is an error. Perhaps i can double the link in this case; I'll see.
-
Correction for links up;
It's not very beautiful but it works. I put 6 images minimum if the number doesn't exist in the movie page and as i don't use parseBA (i don't find link in this page) i put all extralinks empty with this url.
-
Add Name of festivals clickable.
Correction in Awards page in name and date of festivals. Correction if just one festival in awards page.
Put awards result in a customfield (Recompenses) type memo, not in comment field.
Change sort of count image to download. Now respect number choose for affiche and for photo (always add one image for photo).
Speed is more rapid now.
Always problems in :
Name of person in the last Festival in page Awards.
Must add one image in number of photo choosed to be downloaded.
-
Add person name for the last festival.
-
Thank you, now run faster, but at the bottom adding url address PVD yet always blocked.
http://www.allocine.fr/film/fichefilm_gen_cfilm=19259.html
Still missing, however the year of the movie.
-
Thanks,
Correction for link up.
For the year : There's 3 years in the site.
I put in CustomFields : 'Date de sortie' and 'Date de reprise' and there's also 'Date de Production' i don't take it. If we want put year in current field year wich one choose?
-
Thank you, now run faster, but at the bottom adding url address PVD yet always blocked.
http://www.allocine.fr/film/fichefilm_gen_cfilm=19259.html
This is now fine, but created another problem. In the below URL of the poster image is now transferred to the Screenshot field.
http://www.allocine.fr/film/fichefilm_gen_cfilm=181111.html
http://www.allocine.fr/film/fichefilm_gen_cfilm=61772.html
http://www.allocine.fr/film/fichefilm_gen_cfilm=4276.html
and there's also 'Date de Production' i don't take it. If we want put year in current field year wich one choose?
'Année de production' transfer to normal YEAR FIELD, since this is the correct year of publication movie. Checked in several movies.
-
Thanks,
Correction for affiche in screenshot.
Add Year.
Add URL.
-
Thanks,
Correction for affiche in screenshot.
Add Year.
Add URL.
Nice and work.
New and old bug:
- at the bottom adding url address PVD yet always blocked
http://www.allocine.fr/film/fichefilm_gen_cfilm=46112.html
- at the bottom adding url address with this codeconst
pauseBeforeLoad = 10; // Pause before loading (in millisecond)
nMaxAffiches = 5; // Nombre Maximum d'affiches a télécharger
nMaxPhotos = 5; //Add +1 // Nombre Maximum de photos a telecharger
nMaxImages = nMaxAffiches + nMaxPhotos;
PVD work normal, but when I change the code example as followsconst
pauseBeforeLoad = 10; // Pause before loading (in millisecond)
nMaxAffiches = 3; // Nombre Maximum d'affiches a télécharger
nMaxPhotos = 1; //Add +1 // Nombre Maximum de photos a telecharger
nMaxImages = nMaxAffiches + nMaxPhotos;
PVD yet always blocked
http://www.allocine.fr/film/fichefilm_gen_cfilm=56136.html
This example code I use when I do not want the transfer of screenshots. Is it possible to make a feature screenshots that can not be transferred without affecting the operation of scripts, such as, for example, something like this codeGET_SCREENSHOT = False;
- at the bottom adding url address PVD yet with no any data transmission
http://www.allocine.fr/film/fichefilm_gen_cfilm=47319.html
-
i'm just trying the last url :
http://www.allocine.fr/film/fichefilm_gen_cfilm=47319.html
and i have all the data. (with NMax 5)
I look others.
-
Correction for link
http://www.allocine.fr/film/fichefilm_gen_cfilm=46112.html
I'll see the problem of no screenshot.
-
i'm just trying the last url :
http://www.allocine.fr/film/fichefilm_gen_cfilm=47319.html
and i have all the data. (with NMax 5)
Strange, but now is works perfect.
Correction for link
http://www.allocine.fr/film/fichefilm_gen_cfilm=46112.html
I'll see the problem of no screenshot.
With this codeconst
pauseBeforeLoad = 10; // Pause before loading (in millisecond)
nMaxAffiches = 0; // Nombre Maximum d'affiches a télécharger
nMaxPhotos = 0; //Add +1 // Nombre Maximum de photos a telecharger
nMaxImages = nMaxAffiches + nMaxPhotos;
it works.
-
Yes it works,
still the problem of +1 in NMaxPhotos, i tried add an extralinks, add a linksPhoto but not work (perhaps a +1 somewhere but i don't find the solution). I think for the moment i keep code like this sorry.
-
const
pauseBeforeLoad = 10; // Pause before loading (in millisecond)
nMaxAffiches = 5; // Nombre Maximum d'affiches a télécharger
nMaxPhotos = 5; //Add +1 // Nombre Maximum de photos a telecharger
nMaxImages = nMaxAffiches + nMaxPhotos;
Correction for link
http://www.allocine.fr/film/fichefilm_gen_cfilm=46112.html
I'll see the problem of no screenshot.
The reason that this one title did not work, the maximum number of posters for the movie.
Yes it works,
still the problem of +1 in NMaxPhotos i tried add an extralinks, add a linksPhoto but not work (perhaps a +1 somewhere but i don't find the solution). I think for the moment i keep code like this sorry.
I suggest to remove +1 in NMaxPhotos, surely it will work as well as this codeconst
pauseBeforeLoad = 10; // Pause before loading (in millisecond)
nMaxAffiches = 16; // Nombre Maximum d'affiches a télécharger
nMaxPhotos = 2; // Nombre Maximum de photos a telecharger
nMaxImages = nMaxAffiches + nMaxPhotos;
will 100% work, I tested about 30 movies titles and it worked without problems to PVD blocked, including this url http://www.allocine.fr/film/fichefilm_gen_cfilm=46112.html address (7 posters and 1 screenshot).
And are adequately experienced in the screenshot from three years ago:
in the database I had about 550 movies titles, of which around 300-350 movies titles with a screenshot and a lot of 360mb database. When I removed all the screenshots, it was a huge database only between 180 and 270mb.
So conclusion:
less when the screenshots, the lower the database, the better it works PVD program.
-
I don't know if i understand well (my english!).
The script work but we must know that for 1 screenshot we must put NMaxPhotos = 2. We must add +1 to the number wanted.
If i have 5 extralinks :
links_Casting
links_PrePhoto1
links_PrePhoto2
links_PrePhoto3
links_PrePhoto4
the script run like mode 1 then 2 then 3 then 4 then 5
in mode 1, takes information about casting then go to mode 2
in mode 2, takes link of photo1 and put this link in array LinksPhoto
ect....
In ParsePage
when countPhoto is the numer of maximum link_Prephoto (here4) i execute parsephoto, take all links in array linksPhoto and addimageurl....
Then parsepage go to prfinished and download photo.
But ParsePhoto works and download Photo only after mode 4 and not download photo 5.
-
I don't know if i understand well (my english!).
The script work but we must know that for 1 screenshot we must put NMaxPhotos = 2. We must add +1 to the number wanted.
If i have 5 extralinks :
links_Casting
links_PrePhoto1
links_PrePhoto2
links_PrePhoto3
links_PrePhoto4
the script run like mode 1 then 2 then 3 then 4 then 5
in mode 1, takes information about casting then go to mode 2
in mode 2, takes link of photo1 and put this link in array LinksPhoto
ect....
In ParsePage
when countPhoto is the numer of maximum link_Prephoto (here4) i execute parsephoto, take all links in array linksPhoto and addimageurl....
Then parsepage go to prfinished and download photo.
But ParsePhoto works and download Photo only after mode 4 and not download photo 5.
I apologize, but I was tested several of these variants on the work of a full transfer of information. As already mentioned earlier in the opinion are important more than just posters, sreenshotov do not use. I am also not interested because it collected too much space in the database.
-
ok, i'm agree, if you do not want screenshot just put 0 in NMaxPhotos.
And others who save database with images in folders and who are interested just add 1 of the number of screenshots really desired.
But visibly expect to you nobody in the forum was interested with Allocine script so the script is good like this.
I thinked work in a other script for Series in allocine. Personally i don't use series but i you are interested i can see that.
-
Interesting information, if possible can be added to all 'Plus de détail' information in a custom field.
http://www.allocine.fr/film/fichefilm_gen_cfilm=100714.html
-
Ok, i'll take all details in a custom field and delete date de sortie date de creation custom field to put them in.
I don't see my last script post (in reply #34) with correction. I repost it.
-
But visibly expect to you nobody in the forum was interested with Allocine script so the script is good like this.
Thank you, perhaps it would be any better if script was also available on the Download page. (http://www.videodb.info/forum_en/index.php?action=down)
-
Sorry, no connection since 2 days.
Add current field :
Title, origtitle, description
Add Custom Field :
Details
I put list of all custom field in start of script.
I don't konw how put the script in download page.
-
Great, it works ok, but something is missing or some details
Details := AddDetails(HTML,'Langue','<div>Langue</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie VOD','<div>Date de sortie VOD</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie DVD','<div>Date de sortie DVD</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie Blu-ray','<div>Date de sortie Blu-ray</div></th><td>',Details);
that are added in this code://Partie Synopsis et details :
CurPos := Pos('Synopsis et d', HTML);
AddCustomFieldValueByName('Controle parental', TextBetween(HTML,'<span class="insist">','</span>',True,CurPos));
AddFieldValue(13,TextBetween(HTML,'"description">','</p>',True,CurPos));
If Pos('Titre original</div></th><td>',HTML) > 0 then AddFieldValueXML('origtitle',TextBetween(HTML,'Titre original</div></th><td>','</td>',True,CurPos));
CurPos := Pos('e de production',HTML);
If CurPos > 0 then AddFieldValueXML('year',TextBetween(HTML,'">','</span>',True,CurPos));
Details := AddDetails(HTML,'Distributeur','visible"><th><div>Distributeur</div></th><td>',Details);
Details := AddDetails(HTML,'Budget','<div>Budget</div></th><td>',Details);
Details := AddDetails(HTML,'Format de production','Format de production</div></th><td>',Details);
Details := AddDetails(HTML,'Format de projection','Format de projection</div></th><td>',Details);
Details := AddDetails(HTML,'Couleur','Couleur</div></th><td>',Details);
Details := AddDetails(HTML,'Format audio','Format audio</div></th><td>',Details);
Details := AddDetails(HTML,'Type de film','Type de film</div></th><td>',Details);
Details := AddDetails(HTML,'N° de visa','N° de Visa</div></th><td>',Details);
Details := AddDetails(HTML,'Box office France','Box Office France</div></th><td>',Details);
Details := AddDetails(HTML,'Langue','<div>Langue</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie VOD','<div>Date de sortie VOD</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie DVD','<div>Date de sortie DVD</div></th><td>',Details);
Details := AddDetails(HTML,'Date de sortie Blu-ray','<div>Date de sortie Blu-ray</div></th><td>',Details);
AddCustomFieldValueByName('Details',Details);
END;
I made a small cosmetic correction in this code:
before the cosmetic correction
Function AddDetails(HTML, Name, where, strdetail : string):string;
Var
CurPos : Integer;
Begin
CurPos := Pos(where,HTML);
If Copy(HTML,CurPos+Length(where),3) <> ' - ' then begin
Result := strdetail + Name + ' : ' + TextBetween(HTML,'<td>','</td>',true,CurPos) + #13#10;
end else
Result := strdetail;
end;
after the cosmetic correction
Function AddDetails(HTML, Name, where, strdetail : string):string;
Var
CurPos : Integer;
Begin
CurPos := Pos(where,HTML);
If Copy(HTML,CurPos+Length(where),3) <> ' - ' then begin
Result := strdetail + Name + ' : ' + TextBetween(HTML,'<td>','</td>',true,CurPos) + #13#10;
end else
Result := strdetail;
end;
He is a better overview of data transferred in the 'Details' custom field.
I also made a small cosmetic correction in this code:
//Date de sortie :
TestPos := IfNextStep('<span class="lighten">','Date de sortie',HTML,CurPos);
If TestPos <> CurPos then begin
CurPos := TestPos;
.
.
.
end;
//LogMessage('Date de sortie: ' + DteSortie);
//LogMessage('Duree :' + Duree);
AddCustomFieldValueByName('Date de sortie',DteSortie);
Duree := StringReplace(Duree,'h','h ',True,True,True);
AddCustomFieldValueByName('Duree',Duree);
end;
I don't konw how put the script in download page.
Will arrive explanation of PM until Sunday, sorry, I am currently a little tight at the time.
-
Ok Thanks for add the other details, i thinked they have not interest but it's easy to desactive if we don't want them.
The cosmetic it's better with this space.
-
Ok Thanks for add the other details, i thinked they have not interest but it's easy to desactive if we don't want them.
The cosmetic it's better with this space.
Thank you for great job.
-
Very small bug, Very big problem to download page.
Wrong
SCRIPT_TYPE = 0; //Movies
Properly
SCRIPT_TYPE = stMovies;
-
'this archive is not a vald zip archive'
it's the message I get trying to update PVD
/v1.0.2.3
-
'this archive is not a vald zip archive'
it's the message I get trying to update PVD
/v1.0.2.3
Yes, we know that the messages that appear in the transfer Allocine.fr (Pra15) 0.1.0.0 version or Allocine.fr (Pra15) 0.1.0.1 version. Normally, it is transferred Allocine.fr 0.1.0.2 version.
We are waiting on Nostra, that will remove the incorrect version, because the only thing he can do. If I had myself this option alone would do it, but I can not do.