English > Support
AllMovie Https?
afrocuban:
--- Code: --- <row>
<column space="0" halign="left" wordwrap="true" width="75%">Custom Movie Title with number and year<spacer width="8"/><num width="56">Ordinal number<font>
<italic/>
<size>14</size>
<color>$FF9900</color>
</font></num><spacer width="10"/><custom field="Title" autosize="true">Custom Title <font>
<size>24</size>
<color>$FDD017</color>
</font></custom><label autosize="true">Left Bracket label <font>
<size>14</size>
<color>$FDD017</color>
</font><caption> (</caption></label><year autosize="true">Year <font>
<size>14</size>
<color>$FDD017</color>
</font></year><label autosize="true">Right Bracket label <font>
<size>15</size>
<color>$FDD017</color>
</font><caption>)</caption></label><spacer width="10"/><label autosize="true">Left Bracket label for localized title <font>
<italic/>
<size>10</size>
<color>$FF9900</color>
</font><caption> (</caption></label><title autosize="true">Localized title <font>
<italic/>
<size>11</size>
<color>$FF9900</color>
</font></title><label autosize="true">Right Bracket label for localized title <font>
<italic/>
<size>10</size>
<color>$FF9900</color>
</font><caption>)</caption></label></column>
</row>
--- End code ---
So I have 3 titles: custom (English if there is one, or original ohterwise), localized (Serbian title) and original title. AllMovie title is imported into custom title field, localized and original are pulled from imdb. Year field is after custom title and before localized title (see screenshot in previous message, smaller 2007 year), but somehow AllMovie imports year into custom title field (bigger 2007 year in the screenshot above)
Ivek23:
A simple solution.
--- Quote --- //~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);
AddCustomFieldValueByName('Title', TmpStr1);
LogMessage(' Parse Results Title1: '+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);
TmpStr2 := Copy(HTML, curPos, endPos - curPos);
AddCustomFieldValueByName('Title1', TmpStr2);
LogMessage(' Parse Results Title2: '+TmpStr2+' ||');
--- End quote ---
After this code change, the script should work properly.
afrocuban:
Thank you so much! It works like a charm.
Now, I don't want to sound ungratefully, but is there any chance you could include these custom fields in future release, I just sometimes tend to forget to manually update each time the script according to my needs:
--- Code: --- //// 'Synopsis' saved to ~mfDescription~
If Pos('<section class="review read-more synopsis">', HTML) > 0 then begin
curPos := PosFrom('<h4 class="review-author headline" itemprop="author" itemscope itemtype="https://schema.org/Person">', HTML, curPos);
endPos := PosFrom('<span itemprop="name">', HTML, curPos);
TmpStr5 := TextBetween(HTML, '<h4 class="review-author headline" itemprop="author" itemscope itemtype="https://schema.org/Person">', '<span itemprop="name">', True, curPos);
TmpStr5 := StringReplace(TmpStr5, ' by', '', True, True, False);
curPos := PosFrom('<h4 class="review-author headline" itemprop="author" itemscope itemtype="https://schema.org/Person">', HTML, curPos);
endPos := PosFrom('<span itemprop="name">', HTML, curPos);
TmpStr4 := TextBetween(HTML, '<h4 class="review-author headline" itemprop="author" itemscope itemtype="https://schema.org/Person">', '<span itemprop="name">', True, curPos);
TmpStr4 := StringReplace(TmpStr4, 'Synopsis ', ' - ', True, True, False);
curPos := PosFrom('<span itemprop="name">', HTML, curPos);
endPos := PosFrom('</span>', HTML, curPos);
TmpStr3 := TextBetween(HTML, '<span itemprop="name">', '</span>', True, curPos)
curPos := PosFrom('<div class="text" itemprop="description">', HTML, curPos);
endPos := PosFrom(' </div>', HTML, curPos);
//TmpStr := Copy(HTML, curPos, endPos - curPos);
TmpStr := TextBetween(HTML, '<div class="text" itemprop="description">', ' </div>', True, curPos);
TmpStr1 := StringReplace(TmpStr, ' -- ', '—', True, True, False);
TmpStr2 := StringReplace(TmpStr1, ' --- ', '—', True, True, False);
TmpStr := StringReplace(TmpStr2, '--', '—', True, True, False);
TmpStr1 := StringReplace(TmpStr, #13#13#13#13, #13#10#13#10, True, True, False);
TmpStr2 := RemoveTagsEx(TmpStr1);
if (TmpStr5 = 'Synopsis') AND (Pos('©', TmpStr2) = 0) then
AddFieldValue(mfDescription, TmpStr2 + #13 + TmpStr4 + ' ' + TmpStr3)
else
if (TmpStr5 <> 'Synopsis') OR (Pos('©', TmpStr2) = 1) then
LogMessage(' Synopsis: Not available');
AddCustomFieldValueByName('AllMovie Synopsis:', TmpStr);
end;
end;
--- End code ---
which is AddCustomFieldValueByName('AllMovie Synopsis:', TmpStr);
and
--- Code: --- // Get ~mfURL~ or ~URL~
AddFieldValue(mfURL, MovieURL);
AddCustomFieldValueByName('AllMovie.com', '<link url="' + MovieURL + '">AllMovie.com</link>');
LogMessage(' Parse Results MovieURL: '+MovieURL+' ||');
--- End code ---
which is
AddCustomFieldValueByName('AllMovie.com', '<link url="' + MovieURL + '">AllMovie.com</link>');
I totally understand this is rather peculiar request, but whatever your response would be, thank you for everything, ie for you and Easy keeping alive PVD, best piece of software ever.
Ivek23:
--- Quote from: afrocuban on December 26, 2019, 11:32:26 am ---Thank you so much! It works like a charm.
Now, I don't want to sound ungratefully, but is there any chance you could include these custom fields in future release, I just sometimes tend to forget to manually update each time the script according to my needs:
--- Code: --- //// 'Synopsis' saved to ~mfDescription~
If Pos('<section class="review read-more synopsis">', HTML) > 0 then begin
curPos := PosFrom('<h4 class="review-author headline" itemprop="author" itemscope itemtype="https://schema.org/Person">', HTML, curPos);
endPos := PosFrom('<span itemprop="name">', HTML, curPos);
TmpStr5 := TextBetween(HTML, '<h4 class="review-author headline" itemprop="author" itemscope itemtype="https://schema.org/Person">', '<span itemprop="name">', True, curPos);
TmpStr5 := StringReplace(TmpStr5, ' by', '', True, True, False);
curPos := PosFrom('<h4 class="review-author headline" itemprop="author" itemscope itemtype="https://schema.org/Person">', HTML, curPos);
endPos := PosFrom('<span itemprop="name">', HTML, curPos);
TmpStr4 := TextBetween(HTML, '<h4 class="review-author headline" itemprop="author" itemscope itemtype="https://schema.org/Person">', '<span itemprop="name">', True, curPos);
TmpStr4 := StringReplace(TmpStr4, 'Synopsis ', ' - ', True, True, False);
curPos := PosFrom('<span itemprop="name">', HTML, curPos);
endPos := PosFrom('</span>', HTML, curPos);
TmpStr3 := TextBetween(HTML, '<span itemprop="name">', '</span>', True, curPos)
curPos := PosFrom('<div class="text" itemprop="description">', HTML, curPos);
endPos := PosFrom(' </div>', HTML, curPos);
//TmpStr := Copy(HTML, curPos, endPos - curPos);
TmpStr := TextBetween(HTML, '<div class="text" itemprop="description">', ' </div>', True, curPos);
TmpStr1 := StringReplace(TmpStr, ' -- ', '—', True, True, False);
TmpStr2 := StringReplace(TmpStr1, ' --- ', '—', True, True, False);
TmpStr := StringReplace(TmpStr2, '--', '—', True, True, False);
TmpStr1 := StringReplace(TmpStr, #13#13#13#13, #13#10#13#10, True, True, False);
TmpStr2 := RemoveTagsEx(TmpStr1);
if (TmpStr5 = 'Synopsis') AND (Pos('©', TmpStr2) = 0) then
AddFieldValue(mfDescription, TmpStr2 + #13 + TmpStr4 + ' ' + TmpStr3)
else
if (TmpStr5 <> 'Synopsis') OR (Pos('©', TmpStr2) = 1) then
LogMessage(' Synopsis: Not available');
AddCustomFieldValueByName('AllMovie Synopsis:', TmpStr);
end;
end;
--- End code ---
which is AddCustomFieldValueByName('AllMovie Synopsis:', TmpStr);
...
--- End quote ---
Not at all, the smallest problem is to add this.
--- Quote from: afrocuban on December 26, 2019, 11:32:26 am ---and
--- Code: --- // Get ~mfURL~ or ~URL~
AddFieldValue(mfURL, MovieURL);
AddCustomFieldValueByName('AllMovie.com', '<link url="' + MovieURL + '">AllMovie.com</link>');
LogMessage(' Parse Results MovieURL: '+MovieURL+' ||');
--- End code ---
which is
AddCustomFieldValueByName('AllMovie.com', '<link url="' + MovieURL + '">AllMovie.com</link>');
--- End quote ---
Thank you for reminding me of this, I forgot to add this, and I remember that you have made or mentioned this request once before some time ago.
--- Quote from: afrocuban on December 26, 2019, 11:32:26 am --- I totally understand this is rather peculiar request, but whatever your response would be, thank you for everything, ie for you and Easy keeping alive PVD, best piece of software ever.
--- End quote ---
Whenever possible, the request tries to add, or otherwise helps for the benefit of the users, that they are then satisfied with the good functioning of the PVD.
You can find the new version of AllMovie.com_new_HTTPS script at the link below:
http://www.videodb.info/forum_en/index.php/topic,4109.msg20999.html#msg20999
afrocuban:
Thank you so much!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version