From cf99d82e30f3e74ff3099ab08d8e0fbb29f01b5e Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 24 Apr 2019 13:07:22 -0500 Subject: [PATCH] Refactor XF1 XF2 to consolidate logic. --- .../adapters/base_xenforo2forum_adapter.py | 150 ++++-------------- .../adapters/base_xenforoforum_adapter.py | 136 ++++++++++------ 2 files changed, 124 insertions(+), 162 deletions(-) diff --git a/fanficfare/adapters/base_xenforo2forum_adapter.py b/fanficfare/adapters/base_xenforo2forum_adapter.py index 906efef6..bc79b3d0 100644 --- a/fanficfare/adapters/base_xenforo2forum_adapter.py +++ b/fanficfare/adapters/base_xenforo2forum_adapter.py @@ -80,128 +80,44 @@ class BaseXenForo2ForumAdapter(BaseXenForoForumAdapter): def get_post_updated_date(self,souptag): return self.make_date(souptag.find('div',{'class':'message-lastEdit'})) - def extract_threadmarks(self,souptag): - threadmarks=[] - # try threadmarks if no '#' in url - navdiv = souptag.find('div',{'class':'buttonGroup'}) - if not navdiv: - return threadmarks - # was class=threadmarksTrigger. thread cats are currently - # only OverlayTrigger s in threadmarkMenus, but I wouldn't - # be surprised if that changed. Don't want to do use just - # href=re because there's more than one copy on the page; plus - # could be included in a post. Would be easier if