Page 1 of 1

improvement: IMDB.com good URL script

Posted: 2003-02-09 10:20:42
by joazito
Some of you may have noticed that when a movie is found on the first attempt at imdb.com, the URL field is filled with the words used for the search: like http://imdb.com/Title?title=Blue+Crush instead of the more correct http://us.imdb.com/Title?0300532. Well, just replace this line in your script and you'll be fine.

original program:

Code: Select all

SetField(fieldURL, 'http://imdb.com/Title' + copy(Address, pos('?',Address), length(Address)));
modified:

Code: Select all

SetField(fieldURL, 'http://imdb.com/Title' + copy(Page.Text, pos('href="/Details?',Page.Text)+14, 8));

Posted: 2003-02-09 11:05:05
by antp
Ok, thanks

Posted: 2003-02-11 17:30:31
by joazito
Ok this way is better... works 100% of the time.

Code: Select all

SetField(fieldURL, 'http://imdb.com/Title' + copy(Page.Text, pos('href="/Title?',Page.Text)+12, 8));

Posted: 2003-02-11 17:58:19
by antp
thanks :)