mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-05 11:00:47 +02:00
squidge/peja injecting Google Analytics script block.
This commit is contained in:
parent
66ab34ad87
commit
033986f72e
1 changed files with 11 additions and 1 deletions
|
|
@ -152,6 +152,7 @@ class SquidgeOrgPejaAdapter(BaseSiteAdapter):
|
|||
for labelspan in labels:
|
||||
value = labelspan.nextSibling
|
||||
label = labelspan.string
|
||||
#print("label:%s value:%s"%(label,value))
|
||||
|
||||
if 'Summary' in label:
|
||||
## Everything until the next span class='label'
|
||||
|
|
@ -202,7 +203,16 @@ class SquidgeOrgPejaAdapter(BaseSiteAdapter):
|
|||
if 'Updated' in label:
|
||||
# there's a stray [ at the end.
|
||||
#value = value[0:-1]
|
||||
self.story.setMetadata('dateUpdated', makeDate(stripHTML(value), self.dateformat))
|
||||
|
||||
# site has started including a tracking script between Updated label and date--sometimes...
|
||||
svalue = ""
|
||||
while value is not None and not defaultGetattr(value,'class') == 'classification':
|
||||
if '<script' not in unicode(value):
|
||||
svalue += unicode(value)
|
||||
value = value.nextSibling
|
||||
#print("svalue:%s"%svalue)
|
||||
|
||||
self.story.setMetadata('dateUpdated', makeDate(stripHTML(svalue), self.dateformat))
|
||||
|
||||
try:
|
||||
# Find Series name from series URL.
|
||||
|
|
|
|||
Loading…
Reference in a new issue