Its tough to try without any sample code, but here is a half-baked idea...
I assume you only want the webmaster to include the SCRIPT
tag and you do the rest?
In that case I would have your embed code look something like this:
<SCRIPT SRC="path/to/code.js?PARAMS" ID="MY_THING"></SCRIPT>
within your code I would have your code look for the SCRIPT tag with the id "MY_THING". Once you have that element you would look at the src attribute and analyze the PARAMS
PARAMS
would describe the DIV or classNames of there the content lived. You'd have to figure this out but IDs
are easiest or basic path maybe?
Example:
Lets say you want to garb a specific image, and caption (of which there is one, not multiple in this case):
<div class='photo'>
<img id='thisphoto' src="blah.jpg">
<p class='caption'>Blurb</p>
</div>
Then PARAMS
would be:
?img=thisphoto&caption=p.caption
Going with this logic, if the image didn't have a conienent ID
you could grab it with:
?img=div.photo>img&caption=p.caption
You'd need to break that apart within your JS to figure out which elements to look at.
Depending on your needs this could get very complicated, but would work for a straight-forward set of known data.
my 2 cents
Minor Update:
I should also add that you could add custom attributes into the SCRIPT tag:
<SCRIPT photoSrc='ID_OF_ELM' captionSrc='DIV.CLASSNAME'...
Again, could get complicated fast