Quote:
Originally Posted by JimmXinu
Test version with new site: literotica.com adapter mostly by de3sw2aq1. This is very much an adult site.
|
I had to look
The formatting of the epubs produced has a problem. This is because the story text is wrapped in a single p tag. It uses br tags to create the impression of paragraphs. The adapter passes the text through utf8FromSoup and will use replace_br_with_p if the users options have it set. But, because the text is wrapped in a single set of paragraph tags, nothing is changed. To get it working right, I had to strip the tags off.
At line 200 is:
Code:
story1 = soup1.find('div', 'b-story-body-x')
storytext = self.utf8FromSoup(url, story1)
I changed this to:
Code:
story1 = soup1.find('div', 'b-story-body-x')
story1 = str(story1.find('div').p)
story1 = story1[len('<p>'):len(story1) - len('</p>')]
story1 = bs.BeautifulSoup(story1)
storytext = self.utf8FromSoup(url, story1)
In the page loop, line 215 is the same.
This of course doesn't take into account having the "replace_br_with_p" set to false. In that case, the paragraph tag probably should be put back.