[Tutor] ElementTree, TidyHTMLTreeBuilder, find

2005-12-13 Thread Bob Tanner
ot() >>> print root.find('html/body') None >>> print root.find('body') None >>> Viewing the html under firefox DOM tool -#document -HTML +HEAD #TEXT +BODY No sure how to use the find. -- Bob Tanner <[EMAIL PROTECTED]>

Re: [Tutor] Beautiful Soup, inserting a node?

2005-12-02 Thread Bob Tanner
parsing of the html. -- Bob Tanner <[EMAIL PROTECTED]> | Phone : (952)943-8700 http://www.real-time.com, Minnesota, Linux | Fax : (952)943-8500 Key fingerprint = AB15 0BDF BCDE 4369 5B42 1973 7CF1 A709 2CC1 B288 ___ Tutor maillist

[Tutor] Beautiful Soup, inserting a node?

2005-11-28 Thread Bob Tanner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is there a way to insert a node with Beautiful Soup? I found away to append "things". But Blah Foo! I'd like to insert a tag, like this: Blah Foo! -

Re: [Tutor] Delete an attribute using Beautiful Soup?

2005-11-22 Thread Bob Tanner
Bob Tanner wrote: > I'd like to delete an attribute of tag, the BGCOLOR to the BODY tag to be > exact. I believe I answered my own question. Looking for confirmation this is the "right" solution. del(soup.body['bgcolor']) -- Bob Tanner <[EMAIL PROTECTED]

[Tutor] Delete an attribute using Beautiful Soup?

2005-11-22 Thread Bob Tanner
bad HTML can define the same #attribute multiple times. self._getAttrMap() if self.attrMap.has_key(key): del self.attrMap[key] -- Bob Tanner <[EMAIL PROTECTED]> | Phone : (952)943-8700 http://www.real-time.com, Minnesota, Linux | Fax : (