From afadca7586fe9274f199fe1ea584c44e1fb46ffd Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Tue, 12 Nov 2019 21:03:08 -0600 Subject: [PATCH] SB appears to have fixed OP Email notifications--and fetch_last_page didn't always help anyway. Revert "SB needs fetch_last_page again after all." This reverts commit 9ce631c5c067c787a738cc44cdb00b7387aea295. --- .../adapters/base_xenforoforum_adapter.py | 18 +----------------- fanficfare/configurable.py | 2 -- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/fanficfare/adapters/base_xenforoforum_adapter.py b/fanficfare/adapters/base_xenforoforum_adapter.py index 4ea1487e..22849059 100644 --- a/fanficfare/adapters/base_xenforoforum_adapter.py +++ b/fanficfare/adapters/base_xenforoforum_adapter.py @@ -400,18 +400,6 @@ class BaseXenForoForumAdapter(BaseSiteAdapter): # logger.debug(lastpage) return lastpage['href'] - ## Aug 2019 - SB doesn't send update emails for threads it doesn't - ## think you've seen all of since the last email anymore. Fetch - ## the last page of the thread to reset it. This requires login - ## to already have been done. - def fetch_last_page(self,topsoup): - logger.debug("Perform fetch_last_page") - try: - # doing make_soup will also cache posts from that last page. - self.make_soup(self._fetchUrl(self.getURLPrefix()+'/'+self.get_last_page_url(topsoup))) - except: - logger.info("fetch_last_page failed, continuing") - def fetch_forums_breadcrumbs(self,topsoup): ''' Fetch 'breadcrumb' list of forum links, return as list of @@ -431,7 +419,7 @@ class BaseXenForoForumAdapter(BaseSiteAdapter): useurl = opened.geturl() logger.info("use useurl: "+useurl) # can't login before initial fetch--need a cookie. - if self.getConfig('always_login',False) or self.getConfig('fetch_last_page',False): + if self.getConfig('always_login',False): self.performLogin(data) (data,opened) = self._fetchUrlOpened(self.url, usecache=False) @@ -456,10 +444,6 @@ class BaseXenForoForumAdapter(BaseSiteAdapter): if '#' not in useurl and '/posts/' not in useurl: self._setURL(useurl) ## for when threadmarked thread name changes. - # only apply fetch_last_page when not a post url. - if self.getConfig('fetch_last_page',False): - self.fetch_last_page(topsoup) - self.parse_title(topsoup) first_post_title = self.getConfig('first_post_title','First Post') diff --git a/fanficfare/configurable.py b/fanficfare/configurable.py index abda6c71..99563351 100644 --- a/fanficfare/configurable.py +++ b/fanficfare/configurable.py @@ -282,7 +282,6 @@ def get_valid_set_options(): 'replace_failed_smilies_with_alt_text':(base_xenforo_list,None,boollist), 'use_threadmark_wordcounts':(base_xenforo_list,None,boollist), 'always_include_first_post_chapters':(base_xenforo_list,None,boollist), - 'fetch_last_page':(base_xenforo_list,None,boollist), 'use_threadmarks_description':(base_xenforo2_list,None,boollist), 'use_threadmarks_status':(base_xenforo2_list,None,boollist), 'use_threadmarks_cover':(base_xenforo2_list,None,boollist), @@ -499,7 +498,6 @@ def get_valid_keywords(): 'use_threadmarks_status', 'use_threadmarks_cover', 'datethreadmark_format', - 'fetch_last_page', 'fix_pseudo_html', 'fix_excess_space', 'ignore_chapter_url_list',