Quote:
Originally Posted by jimmypatrick
So I'm trying to write the ps3center recipe that was requested here.
|
You could try the following: add the following line at the top of your file (before the class declaration)
Code:
from calibre.ebooks.BeautifulSoup import BeautifulSoup
Then add the following method:
Code:
def preprocess_html(self, soup):
tag = soup.find('td')
for attr, value in tag.attrs:
del tag[attr]
tag.name = 'div'
newSoup = BeautifulSoup('<html><head><title></title></head><body></body></html>')
newSoup.body.append(tag)
return newSoup
Not tested, but should work.