mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
Work around for poorly formatted desc on adastra. Saw error in logs.
This commit is contained in:
parent
33e520fef1
commit
141ed90d74
2 changed files with 5 additions and 2 deletions
2
app.yaml
2
app.yaml
|
|
@ -1,6 +1,6 @@
|
|||
# fanfictionloader ffd-retief
|
||||
application: fanfictionloader
|
||||
version: 4-0-6
|
||||
version: 4-0-7
|
||||
runtime: python
|
||||
api_version: 1
|
||||
|
||||
|
|
|
|||
|
|
@ -122,9 +122,12 @@ class AdAstraFanficComSiteAdapter(BaseSiteAdapter):
|
|||
if 'Summary' in label:
|
||||
## Everything until the next span class='label'
|
||||
svalue = ''
|
||||
while not defaultGetattr(value,'class') == 'label':
|
||||
while value and not defaultGetattr(value,'class') == 'label':
|
||||
svalue += str(value)
|
||||
value = value.nextSibling
|
||||
# sometimes poorly formated desc (<p> w/o </p>) leads
|
||||
# to all labels being included.
|
||||
svalue=svalue[:svalue.find('<span class="label">')]
|
||||
self.story.setMetadata('description',stripHTML(svalue))
|
||||
|
||||
if 'Rated' in label:
|
||||
|
|
|
|||
Loading…
Reference in a new issue