google-code-export / fanficdownloader

Automatically exported from code.google.com/p/fanficdownloader
0 stars 0 forks source link

Fanfiction.net looses hr tag #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Downloaded latest code from repository.
2. ran command python downaloder.py 
http://www.fanfiction.net/s/4747195/1/Rise_To_The_Top epub
3. Open in epub viewer.

What is the expected output? What do you see instead?
Expect to see horizontal lines as they appear in the source. No lines.

What version of the product are you using? On what operating system?
Command line, Python 2.6.4, Ubuntu Linux 9.10

Please provide any additional information below.
hr tags do not show up in xhtml source code in epub files either.

Original issue reported on code.google.com by misii.ma...@gmail.com on 23 Apr 2010 at 8:30

Attachments:

GoogleCodeExporter commented 9 years ago
Accepted, apparently the problem exists.

Original comment by sigizm...@gmail.com on 3 May 2010 at 10:24

GoogleCodeExporter commented 9 years ago
This can be fixed by replacing line 205 in output.py from

allBrs = self.soup.findAll(recursive=True, name = ["br", "hr", 'div'])

to

allBrs = self.soup.findAll(recursive=True, name = ["br", 'div'])

Specifying hr as a self closing tag doesn't hurt either.

Original comment by wizmaste...@gmail.com on 31 Aug 2010 at 6:20

GoogleCodeExporter commented 9 years ago
To make both incoming <br> and <br /> work, it needed to be changed as 
wizmasteromega pointed out and specified as a self closing tag when creating 
the BeautifulStoneSoup object.

Original comment by retiefj...@gmail.com on 8 Oct 2010 at 10:50