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: [Select]//// '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;
which is AddCustomFieldValueByName('AllMovie Synopsis:', TmpStr);
...
andCode: [Select]// Get ~mfURL~ or ~URL~
AddFieldValue(mfURL, MovieURL);
AddCustomFieldValueByName('AllMovie.com', '<link url="' + MovieURL + '">AllMovie.com</link>');
LogMessage(' Parse Results MovieURL: '+MovieURL+' ||');
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.
//// '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;
// Get ~mfURL~ or ~URL~
AddFieldValue(mfURL, MovieURL);
AddCustomFieldValueByName('AllMovie.com', '<link url="' + MovieURL + '">AllMovie.com</link>');
LogMessage(' Parse Results MovieURL: '+MovieURL+' ||');
//~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+' ||');
<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>
Thanks Ivek, it works great again. May I ask you how to import only title of the movie into the title field? Right now this script imports "Title (Year)" into title field? I'm importing year in separate field and I don't know why Allmovie script imports both Title and Year into Title field...
It seems AllMovie doesn't work neither with Proxomitron anymore...
I'll check what's going on, but I already think what's going on. It will probably take a patch for proxomitron to be made. I'll see if I'm wrong or not because I already have to use it for the Rottentomatoes script to work.
It seems AllMovie doesn't work neither with Proxomitron anymore...
Thank you for your answer dear Ivek. Whenever it would be feasible I'd be happy to use this script in PVD MOD without Procomitron.
Hello guys and please receive our bow to your great work!
I wanted to ask you if there is possibility to use AllMovie.com HTTPS.psf script without Proxomitron in PVD MOD? If there is possibility, but it is too much work for you, how we, without programming knowledge, could achieve it?
Any feedback is greatly appreciated.
Thank you in advance.