scraper input
#1
hmm...when creating a scraper, is there only one input buffer $$1 with filename ? I would like to get full movie path, or at least the parent folder's name. Is this possible ?
Reply
#2
not accessible. logic is; a scraper shouldn't even know if it is fetching info for a file, for some in-gui display in a dialog, or whatnot.
Reply
#3
I am very new to this, so these may be stupid questions...

Is there any up to date doco about which variables and data are available to the different scraper functions?
I have read http://wiki.xbmc.org/?title=Scrapers but some things dont seem to match:

Looking at themoviedb scraper
- there appears to be an array variable called $INFO (where it gets language from)
- It also appears that the year is passed in to getSearchUrl as $$2
- There are conditonal="keeporiginaltitle" but the wiki says:
wiki Wrote:conditonal="<condition>": A condition that must resolve to TRUE for the particular RegExp to be run. Currently the only available condition is "override", which is set based on the Language Override setting in the scraper.
Would I be right in guessing that this corresponds to the "keeporiginaltitle" setting defined in resources/settings.xml ?

In my own testing it appears that the URL of the selected movie page is passed in to getDetails as $$3. This also contradicts the wiki which says:
wiki Wrote:$$x where x= 1 to 9: Variable x holds the content of the URL specified in the <url> tag number x in GetSearchResults.

As I said, I am very new to this. A reference would be nice. Or is the only complete reference in the code itself? (which may be well beyond my capabilities to understand)
Reply
#4
The wiki page is indeed very out of date.

(2013-04-17, 09:06)budswell Wrote: - It also appears that the year is passed in to getSearchUrl as $$2
Correct.


(2013-04-17, 09:06)budswell Wrote: Looking at themoviedb scraper
- there appears to be an array variable called $INFO (where it gets language from)
- There are conditonal="keeporiginaltitle" but the wiki says:
wiki Wrote:conditonal="<condition>": A condition that must resolve to TRUE for the particular RegExp to be run. Currently the only available condition is "override", which is set based on the Language Override setting in the scraper.
Would I be right in guessing that this corresponds to the "keeporiginaltitle" setting defined in resources/settings.xml ?
Yes, $INFO[...] will be replaced throughout the scraper by the value used in the settings. Similarly, conditional="..." can refer to any boolean setting.


(2013-04-17, 09:06)budswell Wrote: In my own testing it appears that the URL of the selected movie page is passed in to getDetails as $$3. This also contradicts the wiki which says:
wiki Wrote:$$x where x= 1 to 9: Variable x holds the content of the URL specified in the <url> tag number x in GetSearchResults.
This gets a little trickier (and my knowledge a lot shakier), because you can also specify extra tags in the search results, such as <id> (but not the <title> or <year>) which will also get passed to getDetails, and then I'm guessing the URL(s) come after them.

So with only one URL and an <id> tag, you'd have:
$$1: Contents of URL
$$2: Contents of <id> tag
$$3: URL

If you had two URLS, it would be $$1 & 2: contents of URLs, $$3: id tag, $$4 & 5: URLs (maybe?).
Reply
#5
that's a general thing to all scraper functions. urls will be put in buffers starting with 1, then other stuffs passed comes at the end.
Reply
#6
Thanks heaps
Reply

Logout Mark Read Team Forum Stats Members Help
scraper input0