there is very unusual behaviour of one site, which my script is referring to - when I ask for search (request for page 'http://somesite.com/search.php?s=MovieName'), if more than one movie is found, then everything is OK, but if only one movie is found, than I receive another page with movie details. So,
1) in first case I receive Search results and page 'http://somesite.com/search.php?s=MovieName';
2) in second case I receive Movie Details and another page
'http://somesite.com/movies/123'.
I can detect which page is loaded (by page content), but for further processing I should know URL of loaded page! How can I do it? Could somebody help me pls?
Page redirect - how to handle?
There is no function for that currently, but actually the IMDB script has the same "problem".
For that, I searched the movie number somewhere else in the page (in one of the other links to secondary info pages) and rebuild the URL with that (url := 'http://imcdb.com/title/tt' + movienumber)
For that, I searched the movie number somewhere else in the page (in one of the other links to secondary info pages) and rebuild the URL with that (url := 'http://imcdb.com/title/tt' + movienumber)