Re: [Tutor] Remove certain tags in html files

2007-07-27 Thread Sebastien Noel
t; del (soup.body["onload"]) # This is what needs to be done: ## change tables to divs ## remove all td tags ## remove all tr tags # Tidying soup = soup.prettify() erreurs = "" tidy_options = {"tidy-mark": 0, "wrap": 0, "wrap-attributes"

Re: [Tutor] Remove certain tags in html files

2007-07-27 Thread Sebastien Noel
but decided it > was too long to be instructional, so I pared it back to what I've > included. > > Hope this gets you started, > e. > > Eric Brunson wrote: >> Eric Brunson wrote: >> >>> Sebastien Noel wrote: >>> >>>> Hi, >>>

[Tutor] Remove certain tags in html files

2007-07-27 Thread Sebastien Noel
Hi, I'm doing a little script with the help of the BeautifulSoup HTML parser and uTidyLib (HTML Tidy warper for python). Essentially what it does is fetch all the html files in a given directory (and it's subdirectories) clean the code with Tidy (removes deprecated tags, change the output to b