Posts: 136
Joined: Mar 2009
Reputation:
0
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.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
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
Posts: 136
Joined: Mar 2009
Reputation:
0
Ok cool thanks i'll look it up!
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
$INFO reads the value of a setting. url is a setting defined in GetSettings....
the second expression in the GetSearchResults checks for exact matches
Posts: 136
Joined: Mar 2009
Reputation:
0
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?
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
yes, only if an expression is successful is info added to the dest buffer
Posts: 136
Joined: Mar 2009
Reputation:
0
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.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
not without changing the source. or by peaking in the cache if you use a cache file