Author Topic: AllMovie.com_new movie script  (Read 119633 times)

0 Members and 5 Guests are viewing this topic.

Offline UtNut

  • User
  • ***
  • Posts: 74
    • View Profile
Re: AllMovie.com_new movie script
« Reply #80 on: May 21, 2015, 03:02:22 pm »
Wow Ivek, its magic, you've done it again.

Script works perfect on my side using PVD v0.9.9.21  and PVD Download Manager as skin. I got all the info I want e.g. rating, summary incl name (which I like),  details with url, country, duration, think the tags are going into category. Credits are good, so is release info. There's something funny happening in the Video Data Tab in File Information it imports AllMovie DVD Releases as a link in Features.
I actually like that, was that on purpose?
1984 was NOT supposed to be an instruction manual

Offline UtNut

  • User
  • ***
  • Posts: 74
    • View Profile
Re: AllMovie.com_new movie script
« Reply #81 on: May 21, 2015, 03:27:35 pm »
Was thinking the last bit is a bit cryptic, so here's an image to support it.
Fyi, the link works and goes directly to what is says.
1984 was NOT supposed to be an instruction manual

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #82 on: May 21, 2015, 07:46:17 pm »
Wow Ivek, its magic, you've done it again.

Script works perfect on my side using PVD v0.9.9.21  and PVD Download Manager as skin. I got all the info I want e.g. rating, summary incl name (which I like),  details with url, country, duration, think the tags are going into category. Credits are good, so is release info.

Thanks. I'm glad for the positive feedback.

There's something funny happening in the Video Data Tab in File Information it imports AllMovie DVD Releases as a link in Features.
I actually like that, was that on purpose?

This was already in AllRovi script, as in previous AllMovie script 0.1.2.0
version
, it is also now because I did not name changed (not normal field names as well as not a custom field names).

In the short term it can expected next AllMovie script version, which will be available for testing, perhaps by the end of this week, when I make a few more tests and maybe some additional information transmission, so little you see, if anything new.
« Last Edit: May 22, 2015, 06:30:33 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: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #83 on: May 21, 2015, 07:51:07 pm »
Was thinking the last bit is a bit cryptic, so here's an image to support it.
Fyi, the link works and goes directly to what is says.

The answer to this is below:

This was already in AllRovi script, as in previous AllMovie script 0.1.2.0
version
, it is also now because I did not name changed (not normal field names as well as not a custom field names).
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: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #84 on: May 23, 2015, 04:33:23 pm »
AllMovie.com_new (3) script
v 0.1.2.3.


There is to test AllMovie.com (3) script with many corrections in the transfer of information.

CustomField :
Code: [Select]
AllMovie data: PVD field: FN: Type/Comments:
-------------- --------- -- -------------
Actors ~ctActors~ 1, 3 credits (if GET_ACTORS true)
Alternate title ~Alternate title~ memo
AMG ID ~AMG ID~ short text
Awards ~AllMovie Awards~ memo (link to AllMovie Awards tab)
Cast ~Cast~ memo
Crew ~Crew~ memo
Category ~Category.AllMovie~ multiselect list
—not to be confused with ~mfCategory~ (used for 'Themes')
Characteristics
~Moods~ 2 multiselect list (from 'Characteristics')
AND ~Mood links~ memo (hyperlinks to AllMovie mood pages
—if available in web archive
~Keywords~ 2 memo (from 'Characteristics')
~Attributes~ 2 multiselect list (from 'Characteristics')
Themes from 'Characteristics'
~mfCategory~ 1 standard multiselect list (if GET_THEMES true) (from 'Characteristics')
OR ~Themes~ 2 multiselect list (from 'Characteristics')
AND ~Themes links~ 2 memo (hyperlinks to AllMovie themes pages)
Country ~mfCountry~ 1 standard multiselect list
OR ~Country~ 2 multiselect list
Cover-art ~Poster~ 1, 3 standard (if GET_POSTER true)
Directed by ~ctDirectors~ 1 standard multiselect list
Flags ~Flags~ multiselect list
Genres ~mfGenre~ 1 standard multiselect list
OR ~Genres~ 2 multiselect list
AND ~Genre links~ memo (links to AllMovie Genre page)
MPAA rating ~MPAA rating~ short text
Produced by ~mfStudio~ 1 standard short text
OR ~Produced by~ 2 multiselect list
Review ~Review~ memo
Release date ~Released~ short text (multiple dates)
//OR Released ~Released~ short //text (more common single date)
Releases ~mfFeatures~ 1 standard memo (link to AllMovie Releases tab)
Released by ~Released by~ short text
Rovi rating ~mfRating~ 1, 3 'Additional rating' named 'AllMovie.new' (if GET_RATING true)
OR ~AllMovie rating~ 2 rating
Run time ~mfDuration~ 1, 3 standard number (if GET_DURATION true)
OR ~Run time~ 2 number (minutes)
Synopsis ~mfDescription~ standard memo
—use PVD preference to save in ANY available memo field
Sub-Genres ~Sub-Genres~ multiselect list
OR ~Sub-Genre links~ memo (links to AllMovie page)
Title ~mfTitle~ 1 standard short text
OR ~Title~ 2 short text
Year ~mfYear~ 1 standard number (from AllMovie 'Title (Year)' heading)
OR ~Year~ 2 short string
Updated ~Updated~ long text
URL ~mfURL~ 1 standard memo
OR ~URL~ 2 memo

New Added in Custom Field:

CustomField :

AllMovie Related                        ----> Memo
Search Movie results                        ----> Memo


Script is the attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline UtNut

  • User
  • ***
  • Posts: 74
    • View Profile
Re: AllMovie.com_new movie script
« Reply #85 on: May 23, 2015, 06:00:45 pm »

Brilliant, thanks enormously. I wouldn't use the related function, but I'd guess this is a great thing for others using Allmovie data. Kudos to you.
1984 was NOT supposed to be an instruction manual

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #86 on: May 23, 2015, 07:30:12 pm »
Brilliant, thanks enormously.

Thanks, UtNut.

I wouldn't use the related function, but I'd guess this is a great thing for others using Allmovie data.

Optionally, it's just Related url link to the AllMovie web pages.
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: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #87 on: May 23, 2015, 08:00:08 pm »
I forgot to mention that the added link to the Amazon web site to search movie posters.

CustomField :

Amazon                        ----> Memo
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline UtNut

  • User
  • ***
  • Posts: 74
    • View Profile
Re: AllMovie.com_new movie script
« Reply #88 on: May 24, 2015, 12:24:39 pm »
Excellent, they got some good posters there.
1984 was NOT supposed to be an instruction manual

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #89 on: May 29, 2015, 11:48:26 am »
AllMovie.com_new (4) script
v 0.1.2.3.


There is to test AllMovie.com (4) script with a few changes to speed up the transfer of information.

I wonder if there is any noticeable difference in the transmission of information between the current AllMovie.com (4) script and the transitional AllMovie.com (3) script, because one of these two will be in the future final version on Download page.
We welcome your feedback.

Script is the attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline UtNut

  • User
  • ***
  • Posts: 74
    • View Profile
Re: AllMovie.com_new movie script
« Reply #90 on: May 30, 2015, 06:15:20 pm »
Yes, I'd say the the transmission is faster at import from AllMovie. Other than that the contents remain the same, which is great.

Thanks again.
1984 was NOT supposed to be an instruction manual

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #91 on: May 31, 2015, 09:32:27 am »
Yes, I'd say the the transmission is faster at import from AllMovie. Other than that the contents remain the same, which is great.

Thanks again.

Thanks for your feedback.
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: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #92 on: May 31, 2015, 12:02:46 pm »
AllMovie.com_new script
v 0.1.2.5.


I fixed a lot of errors in the code for:
  • procedure ParseMovie
  • procedure ParseReview
  • procedure ParseCast
  • procedure ParseSearchResults
  • function ParsePage

New Added:
  • Link to the Search on Amazon posters for movie
  • Link to the AllMovie Related tab on web page

In procedure ParseSearchResults is now added to the end of the list of search results is also a link to AllMovie search page for the current title of the movie you are looking for which you are currently looking information in their AllMovie database. It is now currently the only way that you can find the information for a particular movie if in the list of search results for a particular movie you did not find the title of this movie. According to the latest changes in the AllMovie web sites. it is now possible to search results to get a list with more than 20 hits - the title of films (including Source code page by the same number of titles of movies). If you want to find a movie title, you must
at AllMovie search page where you will at the bottom of search results then see the icon, which will then regenerate more movies titles. We'll see in the future what will be found to resolve some of the issues or problems.

There is now a new list of areas from which the transferred information. including normal and custom fields in the PVD database.

Code: [Select]
AllMovie data: PVD field: FN: Type/Comments:
-------------- --------- -- -------------
Actors ~ctActors~ 1, 3 credits (if GET_ACTORS true)
Alternate title ~Alternate title~ memo
AllMovie rating ~mfRating~ 1, 3 'Additional rating' named 'AllMovie.new' (if GET_RATING true)
OR ~AllMovie rating~ 2 rating
Amazon ~Amazon~ memo (link to Search on Amazon)
AMG ID ~AMG ID~ short text
Awards ~AllMovie Awards~ memo (link to AllMovie Awards tab)
Cast ~Cast~ memo
Crew ~Crew~ memo
Category ~Category.AllMovie~ multiselect list
—not to be confused with ~mfCategory~ (used for 'Themes')
Characteristics
~Moods~ 2 multiselect list (from 'Characteristics')
AND ~Mood links~ memo (hyperlinks to AllMovie mood pages
—if available in web archive
~Keywords~ 2 memo (from 'Characteristics')
~Attributes~ 2 multiselect list (from 'Characteristics')
Themes from 'Characteristics'
~mfCategory~ 1 standard multiselect list (if GET_THEMES true) (from 'Characteristics')
OR ~Themes~ 2 multiselect list (from 'Characteristics')
AND ~Themes links~ 2 memo (hyperlinks to AllMovie themes pages)
Country ~mfCountry~ 1 standard multiselect list
OR ~Country~ 2 multiselect list
Cover-art ~Poster~ 1, 3 standard (if GET_POSTER true)
Directed by ~ctDirectors~ 1 standard multiselect list
Flags ~Flags~ multiselect list
Genres ~mfGenre~ 1 standard multiselect list
OR ~Genres~ 2 multiselect list
AND ~Genre links~ memo (links to AllMovie Genre page)
MPAA rating ~MPAA rating~ short text
Produced by ~mfStudio~ 1 standard short text
OR ~Produced by~ 2 multiselect list
Related ~AllMovie Related~ memo (link to AllMovie Related tab)
Review ~Review~ memo
Release date ~Released~ short text (multiple dates)
//OR Released ~Released~ short //text (more common single date)
Releases ~mfFeatures~ 1 standard memo (link to AllMovie Releases tab)
Released by ~Released by~ short text

Run time ~mfDuration~ 1, 3 standard number (if GET_DURATION true)
OR ~Run time~ 2 number (minutes)
Synopsis ~mfDescription~ standard memo
—use PVD preference to save in ANY available memo field
Sub-Genres ~Sub-Genres~ multiselect list
OR ~Sub-Genre links~ memo (links to AllMovie page)
Title ~mfTitle~ 1 standard short text
OR ~Title~ 2 short text
Year ~mfYear~ 1 standard number (from AllMovie 'Title (Year)' heading)
OR ~Year~ 2 short string
Updated ~Updated~ long text
URL ~mfURL~ 1 standard memo
OR ~URL~ 2 memo

AllMovie data are once again available:

Keywords Keywords

AllMovie data no longer again available:

Released Released
//OR Released ~Released~ short //text (more common single date)

AllMovie data no longer available:

Color type Color type
From book Book
Set in Set in
Tones mfTags

And this one change:
Now transferred only full Release date information if there is such information on web pages, but not itself released the year for movie, than this possibility was until now prior to the current changes in the AllMovie web sites.

Notice:
The new version of the script is added to the
Download page.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline UtNut

  • User
  • ***
  • Posts: 74
    • View Profile
Re: AllMovie.com_new movie script
« Reply #93 on: June 02, 2015, 05:37:51 am »
Works like a charm. Many thanks.
1984 was NOT supposed to be an instruction manual

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #94 on: June 02, 2015, 02:01:47 pm »
Works like a charm. Many thanks.

Thank you for the very nice feedback.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online afrocuban

  • Moderator
  • *****
  • Posts: 476
    • View Profile
Re: AllMovie.com_new movie script
« Reply #95 on: October 16, 2015, 04:13:00 pm »
Hello Ivek23,

Is there a way NOT to import year as a part of Title, just Title?

Thank you in advance.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #96 on: October 16, 2015, 06:06:23 pm »
Hello Ivek23,

Is there a way NOT to import year as a part of Title, just Title?

Thank you in advance.

Why?
That's already in the script is done so that the Title-free year in the normal field as well as in the "Title" custom field.

Code: [Select]
//~mfTitle~ or ~Title~

 curPos := Pos('<title>', HTML) + Length('<title>');
 if Pos(') - ', HTML) > 0 then
endPos := PosFrom(') - ', HTML, curPos)-6
 else
endPos := PosFrom(' -  | ', HTML, curPos);
TmpStr1 := Copy(HTML, curPos, endPos - curPos);
AddFieldValue(mfTitle, TmpStr1);
AddFieldValue(mfOrigTitle, TmpStr1);
Title := Copy(HTML, curPos, endPos - curPos);
Title1 := Copy(HTML, curPos, endPos - curPos);

 if Pos(') - ', HTML) > 0 then
endPos := PosFrom(') - ', HTML, curPos)+1
 else
endPos := PosFrom(' -  | ', HTML, curPos);
TmpStr1 := Copy(HTML, curPos, endPos - curPos);
AddCustomFieldValueByName('Title', TmpStr1);

The year has also done the same way as Title.

Code: [Select]
// ~mfYear~ or ~Year~
 
 curPos := Pos('<span class="release-year">', HTML) + Length('<span class="release-year">');
 if Pos('</span>        </h2>', HTML) > 0 then
endPos := PosFrom('</span>        </h2>', HTML, curPos);
TmpStr2 := Copy(HTML, curPos, endPos - curPos);

  if TmpStr2 = '0' then
TmpStr2 := '';
TmpStr2 := StringReplace(TmpStr2, '(', '', True, True, True);
TmpStr2 := StringReplace(TmpStr2, ')', '', True, True, True);
AddFieldValue(mfYear, TmpStr2);
AddCustomFieldValueByName('Year', TmpStr2);

  if TmpStr2 = '' then
TmpStr2 := 'year unknown';
 LogMessage(' Parsing: ' + TmpStr1 + '(' + TmpStr2 + ')');

If this is not what we would like, then please give an example to make it easier to explain and help.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online afrocuban

  • Moderator
  • *****
  • Posts: 476
    • View Profile
Re: AllMovie.com_new movie script
« Reply #97 on: October 16, 2015, 07:06:25 pm »
Thanks for fast reply, Ivek.

I don't want to import year as a part of title because I import year in a separate field,  but mostly because it's not the part of real title.

I use Custom field "Title" to import title from AllMovie.com (which is mostly in English, and I need it), and Standard field "Title" to import localized title from Imdb (Serbian, as you can see on the screenshot), and standard origtitle to import original title from Imdb.

I wouldn't like to import year to a Custom field "Title" from AllMovie.com.

Thank you in advance.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2713
    • View Profile
Re: AllMovie.com_new movie script
« Reply #98 on: October 16, 2015, 07:28:30 pm »
Try like this:

AddCustomFieldValueByName('Title', TmpStr1 + '(' + TmpStr2 + ')');

This is how it should be in the script:
Code: [Select]
//~mfTitle~ or ~Title~

 curPos := Pos('<title>', HTML) + Length('<title>');
 if Pos(') - ', HTML) > 0 then
endPos := PosFrom(') - ', HTML, curPos)-6
 else
endPos := PosFrom(' -  | ', HTML, curPos);
TmpStr1 := Copy(HTML, curPos, endPos - curPos);
AddFieldValue(mfTitle, TmpStr1);
AddFieldValue(mfOrigTitle, TmpStr1);
Title := Copy(HTML, curPos, endPos - curPos);
Title1 := Copy(HTML, curPos, endPos - curPos);

 if Pos(') - ', HTML) > 0 then
endPos := PosFrom(') - ', HTML, curPos)+1
 else
endPos := PosFrom(' -  | ', HTML, curPos);
TmpStr1 := Copy(HTML, curPos, endPos - curPos);
//AddCustomFieldValueByName('Title', TmpStr1);
.
.
.
 // ~mfYear~ or ~Year~
 
 curPos := Pos('<span class="release-year">', HTML) + Length('<span class="release-year">');
 if Pos('</span>        </h2>', HTML) > 0 then
endPos := PosFrom('</span>        </h2>', HTML, curPos);
TmpStr2 := Copy(HTML, curPos, endPos - curPos);

  if TmpStr2 = '0' then
TmpStr2 := '';
TmpStr2 := StringReplace(TmpStr2, '(', '', True, True, True);
TmpStr2 := StringReplace(TmpStr2, ')', '', True, True, True);
AddFieldValue(mfYear, TmpStr2);
// AddCustomFieldValueByName('Year', TmpStr2);

  if TmpStr2 = '' then
TmpStr2 := 'year unknown';
 LogMessage(' Parsing: ' + TmpStr1 + '(' + TmpStr2 + ')');

AddCustomFieldValueByName('Title', TmpStr1 + '(' + TmpStr2 + ')');

I did not tested, but it should work.
« Last Edit: October 16, 2015, 07:35:15 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online afrocuban

  • Moderator
  • *****
  • Posts: 476
    • View Profile
Re: AllMovie.com_new movie script
« Reply #99 on: October 16, 2015, 10:15:39 pm »
Thanks, Ivek,

But now I get year two times, and I want without year at all, like in the second screenshot.

Thank you!

Quote
That's already in the script is done so that the Title-free year in the normal field as well as in the "Title" custom field.

It isn't in my case. When I import Title it imports title with year?!

In custom field "Title" it should be only "A Bittersweet Life", and not "A Bittersweet Life (2005)"
« Last Edit: October 16, 2015, 11:01:38 pm by afrocuban »

 

anything