- February 8, 2006
- 75
- 28
I posted this in another thread before, but I updated it a little, so I decided to give it it's own thread.
The database does not store the extra info for the alternate titles, so it is not possible to use this information after the scraper scrapes. I have created an alternate scraper that should grab the English title for movies.
I haven't done a lot of testing, but here is How it should work:
If the 'Language' field for the movie is anything but English it will search for the first alternate title containing either 'USA' or 'English title' and assign that as the main title for the movie. When you are picking the appropriate movie from the list of possible matches, it will still show up with the original IMDb title, however once you select it it should name your movie properly in English.
I was running into a problem where it would set the 'sort by' field to the original foreign title, so I started hard setting that in the scraper as well (stripping the preceding 'the' 'a' and 'an') I didn't see any other scrapers manually setting the sort by field, so I'm not sure why my version had to do it manually.
I am attaching 2 versions, one which pulls the full summary, and one which pulls the short plot. Both use the new English alternate title. If anyone runs into problems let me know and I will take a look.
Change log:
1.0.1
Fixed a bug that would let it remove 'the' from the beginning of a title, even if it was part of a word, i.e. 'them'. Also, it now strips 'a' and 'an' from the sort by field.
1.0.2
Fixed a bug that would delete the title of a foreign movie if it did not have an English name.
1.0.3
Actually fix bug that I thought I fixed in 1.0.2
The database does not store the extra info for the alternate titles, so it is not possible to use this information after the scraper scrapes. I have created an alternate scraper that should grab the English title for movies.
I haven't done a lot of testing, but here is How it should work:
If the 'Language' field for the movie is anything but English it will search for the first alternate title containing either 'USA' or 'English title' and assign that as the main title for the movie. When you are picking the appropriate movie from the list of possible matches, it will still show up with the original IMDb title, however once you select it it should name your movie properly in English.
I was running into a problem where it would set the 'sort by' field to the original foreign title, so I started hard setting that in the scraper as well (stripping the preceding 'the' 'a' and 'an') I didn't see any other scrapers manually setting the sort by field, so I'm not sure why my version had to do it manually.
I am attaching 2 versions, one which pulls the full summary, and one which pulls the short plot. Both use the new English alternate title. If anyone runs into problems let me know and I will take a look.
Change log:
1.0.1
Fixed a bug that would let it remove 'the' from the beginning of a title, even if it was part of a word, i.e. 'them'. Also, it now strips 'a' and 'an' from the sort by field.
1.0.2
Fixed a bug that would delete the title of a foreign movie if it did not have an English name.
1.0.3
Actually fix bug that I thought I fixed in 1.0.2