Author Topic: Allmovie Script  (Read 51169 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Allmovie Script
« on: April 15, 2010, 08:13:02 pm »
The AllMovie site has been replaced by AllRovi.
See AllRovi movie script for Scripts and Templates board.
Post it now in AllRovi movie script for Support board.



I have a question (the initiative) to AllMovie script:
Would it be possible to add this script from AllMovie.com:
View DVD Releases

View DVD Releases
as
DVD releases for:

It would be very interesting I hope that more of such advice.
« Last Edit: August 06, 2011, 01:19:32 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Allmovie Script
« Reply #1 on: April 16, 2010, 04:13:48 am »
For things like this that don't have much to do with other information in the database, I would prefer to import a link to the page. Also, the page is a simple list of releases. But each item in the list is linked to further information. So if I want that, I'm going to be browsing the site anyway. So I modified my script by adding the following after the Description (aka "plot synopsis") section...

Code: [Select]
//Features (DVD releases)
curPos := PosFrom('<td class="large-list-title" style="padding-top: 13px; padding-bottom: 1px;">', HTML, EndPos);
TmpStr := TextBetween(HTML, '<td class="large-list-title" style="padding-top: 13px; padding-bottom: 1px;">', '>View DVD Releases</a></td>', False, curPos);
TmpStr1 := StringReplace(TmpStr, '» <a href=', '', True, True, False);
If TmpStr1 <> '' then
AddFieldValue(mfFeatures, '<link url=' + TmpStr1 + '>DVD Releases</link>');

This does seem to work, although there's surely a better way to code it. Sadly, even though it's used throughout, I'm clueless about the role curPos and EndPos in the script. :-[

This creates a link using the program's hyperlink function in the Features field. This is a good solution for me because I don't otherwise use the field, it's a type in which hyperlinks can be used, and it just seems logical to me. I'll even leave it in the media information section of my skin. It's not about the existing media, but a link to information about available releases. If I ever do want use it for it's intended purpose, I'm sure I'll be happy to replace the link with the actual feature information for the DVD I own.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #2 on: April 16, 2010, 06:20:28 am »
Quote
If I ever do want use it for it's intended purpose, I'm sure I'll be happy to replace the link with the actual feature information for the DVD I own.

I would ask, therefore, actual feature information.
But I would also welcome the script for additional information AllMovie DVD release, as are they:
100 Girls:

(http://www.allmovie.com/dvd/releases/100-girls-249188)
http://www.allmovie.com/dvd/100-girls-19609
« Last Edit: April 18, 2010, 01:13:41 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #3 on: April 16, 2010, 06:25:28 am »
I think it would be interesting to have such information for those who do not have the original movies on DVD or other media.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Allmovie Script
« Reply #4 on: April 16, 2010, 07:01:04 am »
Quote
I would ask, therefore, actual feature information.

You mean you want a script that will allow you to choose one DVD from the list and import information presented on three separate tabs? AFAK, it's not possible do an item selection with a script. In any case, I don't see the point. You're not going to be able to do anything with the information in PVD other than read it. Why not use a link and read it in a browser? From there, you'll also find it much easier to translate the results, if that's a consideration. ;)

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #5 on: April 16, 2010, 07:08:38 am »
Wanted to say
Quote
You mean you want a script that
also at this link
Quote
http://www.allmovie.com/dvd/100-girls-19609
of course if it were possible.
« Last Edit: April 16, 2010, 07:14:49 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #6 on: April 18, 2010, 02:39:43 pm »
Here
Code: [Select]
//DVD Rating
 AddCustomFieldValueByName('DVD rating', '0');
 curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('alt="', HTML, curPos) + 5;
  EndPos := PosFrom(' ', HTML, curPos);
 
  AddCustomFieldValueByName('DVD rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2)); 
   
 end else
  curPos := EndPos;

//Feature Rating
 AddCustomFieldValueByName('Feature rating', '0');
 curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('alt="', HTML, curPos) + 5;
  EndPos := PosFrom(' ', HTML, curPos);
 
  AddCustomFieldValueByName('Feature rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2)); 

from this link
http://www.allmovie.com/dvd/100-girls-19609

what needs to be corrected that even if this will work.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Allmovie Script
« Reply #7 on: April 18, 2010, 06:06:41 pm »
First, you would somehow have to get to that page. That might be easy if there is only one DVD for a move, but usually there are many. As I said before, I don't believe user-interaction to select one DVD is possible with a script.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #8 on: April 18, 2010, 06:44:10 pm »
Obviously it will be necessary to manually enter this address

http://www.allmovie.com/dvd/100-girls-19609

you must manually enter the url.However, this would then

Code: [Select]
//DVD Rating
 AddCustomFieldValueByName('DVD rating', '0');
 curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('alt="', HTML, curPos) + 5;
  EndPos := PosFrom(' ', HTML, curPos);
 
  AddCustomFieldValueByName('DVD rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2)); 
   
 end else
  curPos := EndPos;

//Feature Rating
 AddCustomFieldValueByName('Feature rating', '0');
 curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('alt="', HTML, curPos) + 5;
  EndPos := PosFrom(' ', HTML, curPos);
 
  AddCustomFieldValueByName('Feature rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2)); 

should work.I will inform how it works.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Allmovie Script
« Reply #9 on: April 18, 2010, 11:51:29 pm »
Quote
you must manually enter the url.

Where? ???

It might help if you explained what your are trying to do, and why.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #10 on: April 19, 2010, 07:25:29 am »
I will explain the Movie Title The Matrix:

Longer way:

The first use URL:
http://www.allmovie.com/work/the-matrix-177524

to get to this page,then go to DVD Releases View,(http://www.allmovie.com/dvd/releases/the-matrix-177524)

Easier way:
Through this

Code: [Select]
//Features (DVD releases)
curPos := PosFrom('<td class="large-list-title" style="padding-top: 13px; padding-bottom: 1px;">', HTML, EndPos);
TmpStr := TextBetween(HTML, '<td class="large-list-title" style="padding-top: 13px; padding-bottom: 1px;">', '>View DVD Releases</a></td>', False, curPos);
TmpStr1 := StringReplace(TmpStr, '» <a href=', '', True, True, False);
If TmpStr1 <> '' then
AddFieldValue(mfFeatures, '<link url=' + TmpStr1 + '>DVD Releases</link>');

I get through this

<link url="http://www.allmovie.com/dvd/releases/the-matrix-177524">DVD Releases</link>
directly to this page DVD releases for:

then choose a title such as this one Matrix (Sep 21, 1999 Warner Home Video)     Feature confirm the movie title Matrix and I get to this page the url http://www.allmovie.com/dvd/matrix-4529

Copy this url in PVD to rest url  and then can I get rating for DVD Rating and Feature Rating,and this

Code: [Select]
//DVD Rating
 AddCustomFieldValueByName('DVD rating', '0');
 curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('alt="', HTML, curPos) + 5;
  EndPos := PosFrom(' ', HTML, curPos);
  
  AddCustomFieldValueByName('DVD rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));  
  
 end else
  curPos := EndPos;

//Feature Rating
 AddCustomFieldValueByName('Feature rating', '0');
 curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('alt="', HTML, curPos) + 5;
  EndPos := PosFrom(' ', HTML, curPos);
  
  AddCustomFieldValueByName('Feature rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));  

when I run my on new modified AllMovie + (Ivek23) script.

« Last Edit: April 19, 2010, 07:35:07 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Allmovie Script
« Reply #11 on: April 19, 2010, 11:10:49 am »
Adding the DVD page to the URL field will result in the script using that instead of the main movie page. So you'll get your DVD ratings, but also overwrite the movie description with the DVD description. And the script will no longer be able to update the movie information (except for some fields which are the same and in the same position on both pages).

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #12 on: April 19, 2010, 02:45:08 pm »
How would the script work

Code: [Select]
//Aka
 AddFieldValue(mfAka, TextBetween(HTML, '<span>AKA</span>', '</table>', True, curPos));

 //Box office
 curPos := PosFrom('<span>Box office</span>', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('<li>', HTML, curPos) + 5;
  EndPos := PosFrom('</li>', HTML, curPos);
  
  TmpStr := Copy(HTML, curPos, EndPos - curPos);
  curPos := Pos('/', TmpStr);
  if curPos > 0 then
   Delete(TmpStr, curPos, Length(TmpStr) - curPos + 1);
  curPos := Pos(':', TmpStr);
  if curPos > 0 then
   Delete(TmpStr, curPos, Length(TmpStr) - curPos + 1);
  AddCustomFieldValueByName('Money', TmpStr);
 end;

if this or something like that remove away.

I hope it's okay and it works.
« Last Edit: June 21, 2010, 06:45:56 pm by rick.ca »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Allmovie Script
« Reply #13 on: April 19, 2010, 06:30:18 pm »
Quote
I hope it's okay and it works.

As stated in the heading and explained in the preamble, the purpose of this table is only to document the "CUSTOM AND NON-STANDARD FIELD MAPPINGS" used in the script. AKA and Box office are standard fields included in the original script. I don't use them, but I assume they work fine.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #14 on: April 21, 2010, 01:11:24 pm »
Here I managed to Description the script.

Would need a small help Features code for Features on the same page.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #15 on: April 29, 2010, 08:52:36 pm »
I have a question:

Movie title Cahill U.S. Marshal you can not find AllMovie.com other than DVD Search Results for: this.
Redirect is this.

I wonder if the such cases was possible special AllMovie+ DVD script.
« Last Edit: April 29, 2010, 08:55:07 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Allmovie Script
« Reply #16 on: April 29, 2010, 09:07:49 pm »
What is your question? ???

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #17 on: April 29, 2010, 10:01:52 pm »
I'm interested in this:
Genre / Type,Street Date,Screen Format,Sound,Studio
because this
Year,Run Time,Work Rating,Countries,Color Type,Genres,
I have to AllMovie + (Ivek23).

I hope this is possible,(Genre / Type,Street Date,Screen Format,Sound,Studio) because I Since would added in script AllMovie+(Ivek23).
Thanks.
« Last Edit: April 30, 2010, 05:49:39 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Allmovie Script
« Reply #18 on: April 30, 2010, 05:50:19 am »
What is your question? ???

A special AllMovie+ DVD script for this site
« Last Edit: June 21, 2010, 06:49:33 pm by rick.ca »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Allmovie Script
« Reply #19 on: April 30, 2010, 06:48:22 am »
Quote
A special AllMovie+ DVD script for this site

Sorry, I have no interest in such a thing. And, as I explained before, I don't believe it's even feasible.

 

anything