Fixed IMDB script!!

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
agb76
Posts: 9
Joined: 2011-08-11 08:18:25

Fixed IMDB script!!

Post by agb76 »

This new version fixes the problems with the translations of original titles to the locale of the Internet connection and with the retrieving of the info of some titles:

Old version: http://pastebin.com/beC51TnY
Fixed version: http://pastebin.com/dBdwgZ1C
NEW!!! last fixed version (fixes the minor bug with extra spaces in the search windows with aka's):
http://pastebin.com/zDxyRtGJ
(see bottom for details)
Last edited by agb76 on 2011-08-17 22:10:00, edited 5 times in total.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

I downloaded and did a short testdrive but the script does not run for me. It starts, asks for movie title (batchmode is set to 1) and then - ends. No error message, no data download, while current script from server still runs for me. On a quick look I did not find the reason and I don't have the time to test intensively now - maybe it's just an option setting or something ?

It still might run for others, but I cannot review it before weekend.
agb76
Posts: 9
Joined: 2011-08-11 08:18:25

Post by agb76 »

Fixed!
Last edited by agb76 on 2011-08-12 04:16:53, edited 1 time in total.
humungus
Posts: 24
Joined: 2010-03-23 00:29:01

Post by humungus »

Hello!

Two quick notes here. Note 1 refers to both bad4u's and agb76's scripts:

1. If PopularSearches = 1, a search for a number of movies returns "No movie found" message. One example I remember is "In weiter Ferne, so nah! (1993)" (without "", obviously, and it's the same without the year, too). Changing the setting to 0 finds the movie. Appending the search terms to the PopularTitleSearchURL in the script and pasting it to my browser opens the movie page, too.

2. Searching for "In weiter Ferne, so nah! (1993)" with PopularSearchers = 0, the results window offers original title "In weiter Ferne, so nah!" and translated title that is... "In weiter Ferne, so nah!" which is not very useful (at least for me). Same result with "Ieri, oggi, domani (1963)", but not, for instance, with "...continuavano a chiamarlo Trinita" which has actual translated titles in "Translated Title" field. This is probably IMDb being inconsistent.

Personally, I'm using bad4u's script wherein I replaced most* urls with akas.imdb.com. Works like a charm with the options I use (except PopularSearches, obviously). The original and translated titles are presented and imported like they used to be before IMDb messed things up (comparison here which also shows the problem mentioned in note 2).

* - due to a load of 404 errors I had to leave at least one URL as www but I can't remember where. Looks like line 199, though. It did away with the 404 errors and it doesn't seem to have any impact on importing titles.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

humungus wrote:1. If PopularSearches = 1, a search for a number of movies returns "No movie found" message. One example I remember is "In weiter Ferne, so nah! (1993)" (without "", obviously, and it's the same without the year, too). Changing the setting to 0 finds the movie. Appending the search terms to the PopularTitleSearchURL in the script and pasting it to my browser opens the movie page, too.
Well, that simply is what IMDb gives as results. "In weiter Ferne, so nah! (1993)" does not have any results listed as "popular", which you can test when searching IMDb for "In weiter" .. though it would be possible to catch these case and offer partial results then or import movie details when it returns the direct link. I'll add that when I find some time.
2. Searching for "In weiter Ferne, so nah! (1993)" with PopularSearchers = 0, the results window offers original title "In weiter Ferne, so nah!" and translated title that is... "In weiter Ferne, so nah!" which is not very useful (at least for me). Same result with "Ieri, oggi, domani (1963)", but not, for instance, with "...continuavano a chiamarlo Trinita" which has actual translated titles in "Translated Title" field. This is probably IMDb being inconsistent.
This might depend on your "aka" address changes, as for me (with script from server) it delivers original title "In weiter Ferne, so nah! (1993)" and translated title ""Faraway, So Close!" - International (English title), USA". As this results differ from the user's country that IMDb detects it is not that easy to test for me (I would need to use proxy servers from different countries). Only the aka subdomain is delivered the same for all users, but had some other problems. I need to find a solution to that, but as it was not urgent I did not spend this extra time on it (hard to find time anyways).

I'm planning few free days from work maybe end of this month and I will have a closer look on it then, maybe I even find time for a complete overwork.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Re: Fixed IMDB script!!

Post by bad4u »

agb76 wrote:This new version fixes the problems with the translations of original titles to the locale of the Internet connection and with the retrieving of the info of some titles:

http://pastebin.com/beC51TnY

This is a fixed version (fully works with all batchmodes and fixed a bug with the decoding of accents, etc..)
The additional Original Title on IMDb pages (in the <span class="title-extra"> tag) seems to be quite new, pretty sure it wasn't there when I last edited the script for this problem. With this one it is quite easy to fix this problem indeed.

Your script seems to work, at least on my short test, but there is no bugfix in it for some problem decoding of accents as you said. Missed that one on your latest edit ?
humungus
Posts: 24
Joined: 2010-03-23 00:29:01

Post by humungus »

bad4u wrote:
humungus wrote:1. If PopularSearches = 1, a search for a number of movies returns "No movie found" message. One example I remember is "In weiter Ferne, so nah! (1993)" (without "", obviously, and it's the same without the year, too). Changing the setting to 0 finds the movie. Appending the search terms to the PopularTitleSearchURL in the script and pasting it to my browser opens the movie page, too.
Well, that simply is what IMDb gives as results. "In weiter Ferne, so nah! (1993)" does not have any results listed as "popular", which you can test when searching IMDb for "In weiter" .. though it would be possible to catch these case and offer partial results then or import movie details when it returns the direct link. I'll add that when I find some time.
I figured it was something of the sort, but having used AMC for nearly four years now, I find this 'problem' to be fairly recent, probably due to some change on IMDb's part. They keep messing around, and not for the better.
bad4u wrote:
2. Searching for "In weiter Ferne, so nah! (1993)" with PopularSearchers = 0, the results window offers original title "In weiter Ferne, so nah!" and translated title that is... "In weiter Ferne, so nah!" which is not very useful (at least for me). Same result with "Ieri, oggi, domani (1963)", but not, for instance, with "...continuavano a chiamarlo Trinita" which has actual translated titles in "Translated Title" field. This is probably IMDb being inconsistent.
This might depend on your "aka" address changes, as for me (with script from server) it delivers original title "In weiter Ferne, so nah! (1993)" and translated title ""Faraway, So Close!" - International (English title), USA".
A small misunderstanding here. The result I described is when using agb76's script, not yours. When using your script, I get both titles (though the English is shown as Original with the German as Translated...). With the 'akas' address I have no issues whatever when it comes to titles (not counting the inordinate amount of spaces between them, but I can deal with that). However, with agb76's script, I get the same (original) title in both fields (as can be seen in the image I link to in my prior post).

Another (understandable) issue I have with agb76's script is that the 'movie selection' window shows translated titles, not original titles (see my image in prior post). When IMDb serves me my localized titles, I have no idea what I'm looking at, so if you do find the time to work on your script, you might want to keep this in mind (using 'akas' address returns original titles in 'movie selection' window).
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

humungus wrote:
bad4u wrote:
2. Searching for "In weiter Ferne, so nah! (1993)" with PopularSearchers = 0, the results window offers original title "In weiter Ferne, so nah!" and translated title that is... "In weiter Ferne, so nah!" which is not very useful (at least for me). Same result with "Ieri, oggi, domani (1963)", but not, for instance, with "...continuavano a chiamarlo Trinita" which has actual translated titles in "Translated Title" field. This is probably IMDb being inconsistent.
This might depend on your "aka" address changes, as for me (with script from server) it delivers original title "In weiter Ferne, so nah! (1993)" and translated title ""Faraway, So Close!" - International (English title), USA".
A small misunderstanding here. The result I described is when using agb76's script, not yours. When using your script, I get both titles (though the English is shown as Original with the German as Translated...). With the 'akas' address I have no issues whatever when it comes to titles (not counting the inordinate amount of spaces between them, but I can deal with that). However, with agb76's script, I get the same (original) title in both fields (as can be seen in the image I link to in my prior post).

Another (understandable) issue I have with agb76's script is that the 'movie selection' window shows translated titles, not original titles (see my image in prior post). When IMDb serves me my localized titles, I have no idea what I'm looking at, so if you do find the time to work on your script, you might want to keep this in mind (using 'akas' address returns original titles in 'movie selection' window).
I see. Previoulsly missed that point 2 only applied to agb's script. As for the spaces between aka titles, it will be fixed with the overworked script then, too. In the meantime, if you can't see aka titles in results list and don't want to scroll, you might want to simply widen the window, it should stay that way until you leave AMC (at least I think so).

Finally it doesn't make sense to replace current script with agb's version meanwhile, it seems ..? Doesn't make sense when solution is to replace one problem with another one, people who already arranged with current limitations, might find more unexpected problems then.
agb76
Posts: 9
Joined: 2011-08-11 08:18:25

Re: Fixed IMDB script!!

Post by agb76 »

In my previous pastbin I forget to call the HtmlDecode function for the ValueAlt variable that controls the extra-title tag.

I fixed and deleted the previous post, that was all.

Sorry for my english, guys!

And I hope someone will fix the script with better programming :) I'm not an Object Pascal programmer


Another thing: I have seen more changes this week in the imdb web... I don't know if, again, there will be new problems with the script...
agb76
Posts: 9
Joined: 2011-08-11 08:18:25

Post by agb76 »

bad4u wrote:Finally it doesn't make sense to replace current script with agb's version meanwhile, it seems ..? Doesn't make sense when solution is to replace one problem with another one, people who already arranged with current limitations, might find more unexpected problems then.
You are right. I use my modification for my purposes, the problems reported don't affect me.

I hope I can help with ideas and reporting it to someone with more time and better Object Pascal programming knowledge :)
agb76
Posts: 9
Joined: 2011-08-11 08:18:25

Post by agb76 »

A small misunderstanding here. The result I described is when using agb76's script, not yours. When using your script, I get both titles (though the English is shown as Original with the German as Translated...). With the 'akas' address I have no issues whatever when it comes to titles (not counting the inordinate amount of spaces between them, but I can deal with that). However, with agb76's script, I get the same (original) title in both fields (as can be seen in the image I link to in my prior post).
I have fixed it. Sorry for the bug, I always put manually the translated title and forget some piece of code.
For coders: I think is not necessary now the AKA section for retrieving translated titles. I have removed it. New imdb web actually translates the title to the locale of the connection. Unfortunatelly, if your language is different to the locale of your connection, you have a problem... you must configure then AMC to use a proxy.
Another (understandable) issue I have with agb76's script is that the 'movie selection' window shows translated titles, not original titles (see my image in prior post). When IMDb serves me my localized titles, I have no idea what I'm looking at, so if you do find the time to work on your script, you might want to keep this in mind (using 'akas' address returns original titles in 'movie selection' window).
I don't understand you very well. This is an issue? I prefer translated titles, why this is an issue?
Last edited by agb76 on 2011-08-17 21:27:20, edited 2 times in total.
agb76
Posts: 9
Joined: 2011-08-11 08:18:25

New version

Post by agb76 »

http://pastebin.com/dBdwgZ1C

Fixed:

- Translated titles are now setted (not via AKA, now with the new IMDB is not required more).
- Stupid bug with Batchmode 2: if a URL is not specified now it acts as BatchMode 1.

I don't found now any other bug...

If anyone found another one please tell me..

Enjoy
Last edited by agb76 on 2011-08-17 18:02:51, edited 3 times in total.
agb76
Posts: 9
Joined: 2011-08-11 08:18:25

Post by agb76 »

A small misunderstanding here. The result I described is when using agb76's script, not yours. When using your script, I get both titles (though the English is shown as Original with the German as Translated...). With the 'akas' address I have no issues whatever when it comes to titles (not counting the inordinate amount of spaces between them, but I can deal with that). However, with agb76's script, I get the same (original) title in both fields (as can be seen in the image I link to in my prior post).
I have fixed it. Sorry for the bug, I always put manually the translated title and forget some piece of code.
For coders: I think is not necessary now the AKA section for retrieving translated titles. I have removed all the section. New imdb web actually translates the title to the locale of the connection. Unfortunatelly, if your language is different to the locale of your connection, you have a problem... you must configure then AMC to use a proxy.
Another (understandable) issue I have with agb76's script is that the 'movie selection' window shows translated titles, not original titles (see my image in prior post). When IMDb serves me my localized titles, I have no idea what I'm looking at, so if you do find the time to work on your script, you might want to keep this in mind (using 'akas' address returns original titles in 'movie selection' window).
I don't understand you very well. This is an issue? I prefer translated titles, as imdb does now when you search. Why is this an issue? If you are searching for other locale translations, configure AMC to use a proxy. Now PopularSearches works with my scripts, also AKAS, with no extra spaces.
Last edited by agb76 on 2011-08-18 09:36:22, edited 1 time in total.
agb76
Posts: 9
Joined: 2011-08-11 08:18:25

Post by agb76 »

New version!!!

http://pastebin.com/zDxyRtGJ

Bugs fixed:

- Extra spaces in search windows with aka names


Enjoy!
humungus
Posts: 24
Joined: 2010-03-23 00:29:01

Post by humungus »

agb76 wrote:
Another (understandable) issue I have with agb76's script is that the 'movie selection' window shows translated titles, not original titles (see my image in prior post). When IMDb serves me my localized titles, I have no idea what I'm looking at, so if you do find the time to work on your script, you might want to keep this in mind (using 'akas' address returns original titles in 'movie selection' window).
I don't understand you very well. This is an issue? I prefer translated titles, as imdb does now when you search. Why is this an issue? If you are searching for other locale translations, configure AMC to use a proxy. Now PopularSearches works with my scripts, also AKAS, with no extra spaces.
It's an issue because our movie titles are getting increasingly stupid and very rarely have anything to do with the original titles and I find I frequently have no idea what movie they're talking about in articles and such. These same titles in search results are just as confusing to me.

I prefer original titles by far even though that does mean I usually can't find my spaghetti westerns. :lol:
Philx
Posts: 14
Joined: 2009-08-24 01:57:17
Location: Vancouver BC Canada

Post by Philx »

Tried a limted run and it seems to work fine. Thanks for the update.
the_observer
Posts: 62
Joined: 2009-11-12 05:53:14

Post by the_observer »

Hi,

Using the batch mode 2 (download with url) i receive results where Translated title is the same as the original title.

Does imdb changed something again?

Thank you for your time reading this.

Regards.
ChelOis
Posts: 1
Joined: 2012-10-08 18:50:46
Location: Argentina

Post by ChelOis »

I tried all 3 scripts:
  • - Original by bad4u
    - Modified by agb76
    - Original patched by humungus
For some movies, the Original Script by bad4u fails in assigning the correct Original and Translated Titles, i.e. for "Burn After Reading (2008)" it puts this title as the Translated and the local title ("Quémese después de leerse" for Argentina) as the Original.

For some movies, the Modified Script by agb76 wrongly assigns Original Title to both, Original and Translated, i.e. "Halt Auf Freier Strecke (2011)" (AKA "Stopped On Track").

The patch suggested by humungus applied to Original Script works quite well assigning the titles as expected. The only issue is the extra spaces between Translated Titles, but this is really a minor bug. Therefore, while no update is available I am using humungus script.

Can anybody tell me of a script instead of IMDB script? Which of the scripts shipped with AMC can get complete and correct information?

Thanks in advance.
Post Reply