'Extracts the inner JavaScript text/template from a html page.
Example::
>>> template = extract_script_template(res.content, \'#template-id\')
>>> template(\'#my-jquery-selector\')
Returns a PyQuery object that you can refine using jQuery selectors.'

def extract_script_template(self, html, template_selector):

    return pq(pq(html)(template_selector).html())
