From 033986f72e38f6633d7519e1c4d0d8fd7297aa9b Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 18 Dec 2014 11:16:10 -0600 Subject: [PATCH] squidge/peja injecting Google Analytics script block. --- fanficdownloader/adapters/adapter_squidgeorgpeja.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fanficdownloader/adapters/adapter_squidgeorgpeja.py b/fanficdownloader/adapters/adapter_squidgeorgpeja.py index e704850..98927ca 100644 --- a/fanficdownloader/adapters/adapter_squidgeorgpeja.py +++ b/fanficdownloader/adapters/adapter_squidgeorgpeja.py @@ -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 '