sys.path.insert(0, bs_path)
_InitBeautifulSoup()
import BeautifulSoup
+import polymer_soup
class InlineScript(object):
class HTMLModuleParserResults(object):
def __init__(self, html):
- self._soup = BeautifulSoup.BeautifulSoup(html)
+ self._soup = polymer_soup.PolymerSoup(html)
self._inline_scripts = None
@property
yield self.GenerateHTML(controller)
def GenerateHTML(self, controller):
- soup = BeautifulSoup.BeautifulSoup(str(self._soup))
+ soup = polymer_soup.PolymerSoup(str(self._soup))
# Remove decl
for x in soup.contents:
for stylesheet_link in stylesheet_links:
html = controller.GetHTMLForStylesheetHRef(stylesheet_link['href'])
if html:
- tmp = BeautifulSoup.BeautifulSoup(html).findChildren()
+ tmp = polymer_soup.PolymerSoup(html).findChildren()
assert len(tmp) == 1
stylesheet_link.replaceWith(tmp[0])
else: