Page delivers first search result if there is only one.
#1
After finishing my first scraper yesterday i wrote 2 more, the 2nd on worked on the fly and the 3rd one is finished as well, the only problem is, that the page directs to the only search result if there aren't anymore.

But the scraper now trys "GetSearchResults" on this page, although its already the correct movie page and it should now process "GetDetails".
It therefor fails.
Anybody stumbled upon this problem yet and got an idea what to do?

The only idea if got at the moment is trying to find an regex what would find the "searched movie" in either the returned searches or an the explicit movie page, what might by very hard to do.
Reply
#2
see imdb.xml (does exactly what your suggest). getsearchresults gets the url it downloaded as $$2 so you could use that to help you out
Reply
#3
Ok cool thanks i'll look it up!
Reply
#4
I found a workaround but now i wanted to use your tipp but I cant find that section in the imdb.xml which would solve my problem.

Maybe I oversaw it.

And when I use the ScraperEditor and test the imdb.xml it doesnt work for a movie whos page is directly found (vals im bashir) so i cant look it up how its working.

Imdb also makes alot of use of $INFO[url]. I investigated the xml some time but I realy cant find where this is defined.

Many questions at once, but maybe somebody can help me getting a bit wiser Smile
Reply
#5
$INFO reads the value of a setting. url is a setting defined in GetSettings....

the second expression in the GetSearchResults checks for exact matches
Reply
#6
Thank you very much, so the scraper runs the different regex searches but only one of the two will succeed (depending on if we got a result page or the film page we were looking for) and will write back the results?
Reply
#7
yes, only if an expression is successful is info added to the dest buffer
Reply
#8
Is it possible to somehow look at the page that is in the buffer the scraper fetches before the GetSearchResults function ist executed?
I cant look it up with the scraper editor and the xbmc logs only show me the search url and then the result of getresult which is empty.

Im not sure what's in the buffer but im getting redirected during the search and I think thats the problem and im interested which information xbmc is scraping.
Reply
#9
not without changing the source. or by peaking in the cache if you use a cache file
Reply

Logout Mark Read Team Forum Stats Members Help
Page delivers first search result if there is only one.0