English > Scripts and Templates

AllMovie.com_new movie script

<< < (10/22) > >>

Ivek23:

--- Quote from: afrocuban on April 30, 2013, 05:40:04 pm ---Thanks.
--- End quote ---

Thank you for all the feedback.

Ivek23:

--- Quote from: rick.ca on April 30, 2013, 07:00:48 am ---BTW, neither version found the movie until I added the URL manually.
--- End quote ---

There are also variants of the script did not find the movie:

* It is possible that the film you are looking to contain inappropriate content (adult movies) and filter for the children of this film does not show in the list of search results (filter is already in primary settings). As far as I know, AllRovi websites use this filter and AllMovie new website also use this filter.
* It is possible that the movie you are looking for is not listed in the AllMovie database. When I some time ago update my movie database with AllMovie_new script, I had a few examples of movies when AllMovie_new script did not find the movie, but with AllRovi script was found.

Ivek23:
AllMovie.com_new script
v 0.1.1.3.

I fixed all ParseReview:
piece of code


--- Code: ---//~Review~

curPos := PosFrom('<span>', HTML, curPos);
endPos := PosFrom('</span>', HTML, curPos);
TmpStr5 := TextBetween(HTML, '<span>', '</span>', True, curPos);
curPos := PosFrom('<span>by', HTML, curPos);
endPos := PosFrom('</span>', HTML, curPos);

TmpStr3 := TextBetween(HTML, '<span>by ', '</span>', True, curPos)

curPos := PosFrom('<strong>', HTML, curPos);
endPos := PosFrom('</strong>', HTML, curPos);
TmpStr4 := TextBetween(HTML, '<strong>', '</strong>', True, curPos);

curPos := PosFrom('<p>', HTML, curPos);
endPos := PosFrom('</p>', HTML, curPos);
TmpStr := Copy(HTML, curPos, endPos - 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);

AddCustomFieldValueByName('Review', TmpStr2 + #13 + '—' + TmpStr3);
--- End code ---
changed in this part of the code
--- Code: ---//~Review~

//curPos := PosFrom('<span>', HTML, curPos);
//endPos := PosFrom('</span>', HTML, curPos);
//TmpStr5 := TextBetween(HTML, '<span>', '</span>', True, curPos);
//curPos := PosFrom('<span>by', HTML, curPos);
//endPos := PosFrom('</span>', HTML, curPos);

//TmpStr3 := TextBetween(HTML, '<span>by ', '</span>', True, curPos)

//curPos := PosFrom('<strong>', HTML, curPos);
//endPos := PosFrom('</strong>', HTML, curPos);
//TmpStr4 := TextBetween(HTML, '<strong>', '</strong>', True, curPos);

//curPos := PosFrom('<p>', HTML, curPos);
//endPos := PosFrom('</div>', HTML, curPos);
//TmpStr := Copy(HTML, curPos, endPos - 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);

//AddCustomFieldValueByName('Review', TmpStr2 + #13 + '—' + TmpStr3);

curPos := PosFrom('<span itemprop="itemreviewed">', HTML, curPos);
endPos := PosFrom('</span>', HTML, curPos);
TmpStr5 := TextBetween(HTML, '<span itemprop="itemreviewed">', '</span>', True, curPos);
curPos := PosFrom('<span itemprop="rating">', HTML, curPos);
endPos := PosFrom('</span>', HTML, curPos);
TmpStr4 := TextBetween(HTML, '<span itemprop="rating">', '</span>', True, curPos);
curPos := PosFrom('<span itemprop="reviewer">', HTML, curPos);
endPos := PosFrom('</span>', HTML, curPos);

TmpStr3 := TextBetween(HTML, '<span itemprop="reviewer">', '</span>', True, curPos)

curPos := PosFrom('<span itemprop="description">', HTML, curPos)+ 29;
endPos := PosFrom('</span>', HTML, curPos);
TmpStr := Copy(HTML, curPos, endPos - curPos);

AddCustomFieldValueByName('Review', TmpStr + '—' + TmpStr3);
--- End code ---

Prior to this change in the code, the transmission of info only to the first paragraph from the Review tab. After this change in the code, the transmission of info for all Review paragraphs from the Review tab (full review).

Notice:
The new version of the script is added to the Download page.

afrocuban:
Thanks a lot Ivek. It works just as you described it.

Now, could you consider to create a "quick" allmovie script, just like you did for IMDb, for example? Just url, title and rating, let's say.

At least, I'd adapt one for my needs, if you'd describe me what "parts" of the code are obligatory for the script to work, beside url, title and rating sections. You can just publish script that works but imports nothing ("dummy" one, and I'd compare two scripts and set it for my needs. Don't laugh, I just don't know anything about programming, some basic, pascal and FORTRAN 25 years ago, and that's all, but helpful. ;D

This I need because I'm planning to import allmovie data for my all movies (~6000), and since it's impossible silent mode on to work with your script, I'd have to spend as less as possible time first to get urls for each single entry. In a second row, I'd turn the silent mode on, and let your full script to work the rest.

Thanks in advance.

rick.ca:

--- Quote ---I'd have to spend as less as possible time first to get urls for each single entry.
--- End quote ---

You're not likely to save more time than what you're asking Ivek to spend. Run run the script overnight and see what you've got in the morning.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Reply

Go to full version