From 35c066ea65adf6f0e0f1e852d987fb27c502e978 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Mon, 1 Feb 2016 14:23:13 -0600 Subject: [PATCH] Add code for lazyload images in base_xenforoforum. --- fanficfare/adapters/base_xenforoforum_adapter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fanficfare/adapters/base_xenforoforum_adapter.py b/fanficfare/adapters/base_xenforoforum_adapter.py index 6e110d3..63efe56 100644 --- a/fanficfare/adapters/base_xenforoforum_adapter.py +++ b/fanficfare/adapters/base_xenforoforum_adapter.py @@ -310,6 +310,11 @@ class BaseXenForoForumAdapter(BaseSiteAdapter): for qdiv in bq.find_all('div',{'class':'quoteExpand'}): qdiv.extract() # Remove
click to expand
+ + ## img alt="[​IMG]" class="bbCodeImage LbImage lazyload + ## include lazy load images. + for img in bq.find_all('img',{'class':'lazyload'}): + img['src'] = img['data-src'] except Exception as e: if self.getConfig('continue_on_chapter_error'):