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

0 Members and 2 Guests are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2656
    • View Profile
Re: AllMovie.com_new movie script
« Reply #100 on: October 17, 2015, 06:34:26 am »
OK, now I understand what and how the thing looked like. I'm sorry, last night I did not 100% of the stuff because I night vision a little teases (I see worse because the eyes are too tired).

OK, now could be the right solution:

not this one
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.

even this does not
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.

but this should however be fine
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);

This is how it should be in the script:
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 + ')');
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 444
    • View Profile
Re: AllMovie.com_new movie script
« Reply #101 on: October 17, 2015, 10:18:55 am »
Ivek,

Great tip and work as usual! Thank you so much for being there for us!  :D

Wish you all the best.

Note: This is to relate to this forum topic, if someone is interested in with it.
« Last Edit: October 17, 2015, 10:35:54 am by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2656
    • View Profile
Re: AllMovie.com_new movie script
« Reply #102 on: October 17, 2015, 11:23:16 am »
Ivek,

Great tip and work as usual! Thank you so much for being there for us!  :D

Wish you all the best.

Note: This is to relate to this forum topic, if someone is interested in with it.

Thank you, good to hear that now everything is fine and that it works.
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: 2656
    • View Profile
Re: AllMovie.com_new movie script
« Reply #103 on: November 18, 2017, 09:05:36 am »
Important news:

AllMovie.com_new script don't work anymore
and AllMovie.com is the next Web site that is passed to a secure https:// connection.

AllMovie.com works with AllMovie.com_new_HTTPS script version 1.1.2.6 or  AllMovie.com_new_HTTPS script version 1.1.2.5 again.

For more information, read this topic Proxomitron - next https solution for PVD in the Development section and Allmovie.com https topic in the
Support section

For all guests:

You can find a link to download the script in AllMovie.com_new_HTTPS Movie Links topic.
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: 2656
    • View Profile
Re: AllMovie.com_new movie script
« Reply #104 on: November 27, 2023, 07:13:49 pm »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


 

anything