Lines Matching full:soup
1 """Beautiful Soup
6 Beautiful Soup parses a (possibly invalid) XML or HTML document into a
16 Beautiful Soup works with Python 2.2 and up. It has no external
26 Beautiful Soup defines classes for two main parsing strategies:
35 Beautiful Soup also defines a class (UnicodeDammit) for autodetecting
39 For more than you ever wanted to know about Beautiful Soup, see the
61 * Neither the name of the the Beautiful Soup Consortium and All
100 #These hacks make Beautiful Soup able to parse XML with namespaces
383 return str.replace("%SOUP-ENCODING%", encoding)
444 if u'%SOUP-ENCODING%' in output:
650 and '%SOUP-ENCODING%' in val):
761 #Soup methods
1007 def __init__(self, soup):
1009 self.soup = soup
1015 self.soup.extractCharsetFromMeta(attrs)
1017 self.soup.unknown_starttag(name, attrs)
1020 self.soup.unknown_endtag(name)
1023 self.soup.handle_data(content)
1028 self.soup.endData()
1030 self.soup.endData(subclass)
1034 object, possibly one with a %SOUP-ENCODING% slot into which an
1037 text = u"xml version='1.0' encoding='%SOUP-ENCODING%'"
1046 if self.soup.convertEntities:
1057 if self.soup.convertHTMLEntities:
1063 if not data and self.soup.convertXMLEntities:
1064 data = self.soup.XML_ENTITIES_TO_SPECIAL_CHARS.get(ref)
1066 if not data and self.soup.convertHTMLEntities and \
1067 not self.soup.XML_ENTITIES_TO_SPECIAL_CHARS.get(ref):
1168 """The Soup object is initialized as the 'root tag', and the
1174 HTMLParser, but Beautiful Soup can nonetheless choke or lose data
1178 By default, Beautiful Soup uses regexes to sanitize input,
1190 tuples to get Beautiful Soup to scrub your input the way you
1256 # soup object can be deepcopied later on. Some
1288 # 'string' property, so that soup.tag.string is shorthand for
1289 # soup.tag.contents[0]
1554 """Beautiful Soup can detect a charset included in a META tag,
1582 return match.group(1) + "%SOUP-ENCODING%"
1685 #think the names of the Beautiful Soup parser classes are too silly
1687 #your pain! For such-minded folk, the Beautiful Soup Consortium And
1999 soup = BeautifulSoup(sys.stdin)
2000 print soup.prettify()