mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-05 02:51:48 +02:00
Fix ksarchive for poor summary html (copied from twcs).
This commit is contained in:
parent
f073c2543f
commit
615f7b2bc2
1 changed files with 7 additions and 1 deletions
|
|
@ -197,7 +197,13 @@ class KSArchiveComAdapter(BaseSiteAdapter): # XXX
|
|||
svalue = ""
|
||||
while not defaultGetattr(value,'class') == 'label':
|
||||
svalue += str(value)
|
||||
value = value.nextSibling
|
||||
# poor HTML(unclosed <p> for one) can cause run on
|
||||
# over the next label.
|
||||
if '<span class="label">' in svalue:
|
||||
svalue = svalue[0:svalue.find('<span class="label">')]
|
||||
break
|
||||
else:
|
||||
value = value.nextSibling
|
||||
self.setDescription(url,svalue)
|
||||
#self.story.setMetadata('description',stripHTML(svalue))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue