English > Scripts and Templates
AllRovi movie script
Ivek23:
--- Quote ---Another thing I was wondering... For existing movies previously updated with Allmovies, would it be possible to get the saved Allmovie URL and convert it to a Rovi URL? If so, then a search and this sort of error could be avoided.
--- End quote ---
I do not know if I have understood this, but I now update 8 Mile (2002), url in the url field has remained, while in the field will be overwritten by custom, add pictures.
[attachment deleted by admin]
Ivek23:
--- Quote ---I just posted version 6, so I'll let you add this to version 7. If it improves the handling of ambiguous titles, that would be great. As I've been testing (generally updating movies already in my database), I've noticed it can make a bad selection from the search results. My old AllMovie+ script did that too, so I thought this might be something we have to live with. It would, of course, be much better if it asked if there were more than one movie in the search results.
--- End quote ---
More than one (with at least two similar or same title unless there where only one) movie in the search results.
rick.ca:
--- Quote ---I do not know if I have understood this...
--- End quote ---
No, that's not what I mean. Using your example, your 8 Mile record now has the AllRovi URL recorded: http://www.allrovi.com/movies/movie/8-mile-v261159. If you run the script again, the function GetDownloadURL will retrieve that from the record and use it to access the page directly—no search will be done. It's able to select that URL from the URL field—which may contain many URL's—because we've provided the BASE_URL: http://www.allrovi.com.
I don't understand the logic of the script, but there must be a way use this function like this:
* with BASE_URL = 'http://www.allrovi.com';
* if there is no result, again with BASE_URL = 'http://www.allmovie.com';
* if a URL is retrieved, then ParsePage;
* otherwise, do the search.
Just to be clear, the only thing different here is step 2. And I don't think the script has much to do with step 4—the main application downloads the page (whatever it is) and ParsePage handles it. For the same reason, I have difficulty seeing a point at which step 2 might be inserted. Unless this is straightforward, it's probably not worth the bother. But I think it would be very helpful generally if we understood how things like this work. :-\
BTW, the Scripting Manual has some interesting tidbits hidden in it—like this one:
"If you download poster in a movie information script or a photo in a person information script then make sure URL to an image is passed after all other pages are retrieved!"—found at the end of the GetDownloadURL example.
No wonder I was having such a problem with the Poster messing up the Rating! I did try to move it to the end, but for some reason it then didn't work. Maybe you could give that a try.
--- Quote ---More than one (with at least two similar or same title unless there where only one) movie in the search results.
--- End quote ---
As long as it doesn't stop and ask when one title is exact but another is "similar."
It's still not clear to me what this is about. If this code presents the search results, what is doing now? Automatically using the first hit, unless it's not similar enough to the search term? Come to think of it, when the dialog appears, it's most often just to confirm one found movie. Seldom, if ever, am I presented with a list to choose from. Anyway—no need to explain. I'll figure it out after you've added it to the script.
Ivek23:
--- Quote from: minolotus on July 12, 2011, 09:08:12 pm ---I trying to test yours script but I think I get lost in with all these codes :o. I have downloaded the version 0.1.0.5 from Ivek's first post and a version from rick.ca (0.1.0.4). My question is if I have to add custom items to the database? I have added a characteristic memo field and that works. But I am not sure if I need more items to test the full possible range of your scripts.
--- End quote ---
Sorry for the delay with the response that for those custom fields, what you use and the start script as follows
--- Code: --- AddCustomFieldValueByName(' ... );
--- End code ---
for others this
--- Code: ---AddFieldValue(mf... );
--- End code ---
custom fields do not need.
Ivek23:
--- Quote ---No wonder I was having such a problem with the Poster messing up the Rating! I did try to move it to the end, but for some reason it then didn't work. Maybe you could give that a try.
--- End quote ---
I modified the Poster and procedures ParseSearchResults
That's all there.
Notice:
Adding in the first post new AllRovi Script Version 0.1.0.7
--- Quote from: rick.ca on July 13, 2011, 01:07:10 pm ---
--- Quote ---I do not know if I have understood this...
--- End quote ---
No, that's not what I mean. Using your example, your 8 Mile record now has the AllRovi URL recorded: http://www.allrovi.com/movies/movie/8-mile-v261159. If you run the script again, the function GetDownloadURL will retrieve that from the record and use it to access the page directly—no search will be done. It's able to select that URL from the URL field—which may contain many URL's—because we've provided the BASE_URL: http://www.allrovi.com.
I don't understand the logic of the script, but there must be a way use this function like this:
* with BASE_URL = 'http://www.allrovi.com';
* if there is no result, again with BASE_URL = 'http://www.allmovie.com';
* if a URL is retrieved, then ParsePage;
* otherwise, do the search.
Just to be clear, the only thing different here is step 2. And I don't think the script has much to do with step 4—the main application downloads the page (whatever it is) and ParsePage handles it. For the same reason, I have difficulty seeing a point at which step 2 might be inserted. Unless this is straightforward, it's probably not worth the bother. But I think it would be very helpful generally if we understood how things like this work. :-\
BTW, the Scripting Manual has some interesting tidbits hidden in it—like this one:
"If you download poster in a movie information script or a photo in a person information script then make sure URL to an image is passed after all other pages are retrieved!"—found at the end of the GetDownloadURL example.
--- End quote ---
I do this later to see how and what.
Would be generally the script or more for you.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version