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]>
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
-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!
-
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]
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 : (