def iter_links_script_element(self, element):
        '''Iterate a ``script`` element.'''
        if self.javascript_scraper and element.text:
            link_iter = self.javascript_scraper.scrape_links(element.text,
                                                             context=True)

            for link, context in link_iter:
                inline = is_likely_inline(link)

                if context is True:
                    link_type = None
                else:
                    link_type = context

                yield LinkInfo(
                    element=element, tag=element.tag, attrib=None,
                    link=link,
                    inline=inline, linked=not inline,
                    base_link=None,
                    value_type='script',
                    link_type=link_type
                )

        for link in self.iter_links_plain_element(element):
            yield link
def iter_links_script_element ( self , element ) : if self . javascript_scraper and element . text : link_iter = self . javascript_scraper . scrape_links ( element . text , context = True ) for link , context in link_iter : inline = is_likely_inline ( link ) if context is True : link_type = None else : link_type = context yield LinkInfo ( element = element , tag = element . tag , attrib = None , link = link , inline = inline , linked = not inline , base_link = None , value_type = 'script' , link_type = link_type ) for link in self . iter_links_plain_element ( element ) : yield link
Iterate a ``script`` element.