Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-fanficfare for 
openSUSE:Factory checked in at 2023-03-03 22:28:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-fanficfare (Old)
 and      /work/SRC/openSUSE:Factory/.python-fanficfare.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-fanficfare"

Fri Mar  3 22:28:25 2023 rev:48 rq:1069115 version:4.21.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-fanficfare/python-fanficfare.changes      
2023-02-22 15:21:41.857899085 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-fanficfare.new.31432/python-fanficfare.changes
   2023-03-03 22:31:32.200064368 +0100
@@ -1,0 +2,16 @@
+Fri Mar  3 09:15:19 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 4.21.0:
+  * adapter_fictionlive: fix #922 -- call utf8fromSoup exactly
+    once - Thanks, HazelSh!
+  * adapter_royalroadcom: Fixes for site changes. #923
+  * AO3: Re-soup full_work on every chapter to avoid problems
+    with soup changes. Found with
+    always_reload_first_chapter:true
+  * adapter_thesietchcom: Fix for site more closely following
+    XenForo2
+  * FlareSolverr: novelfull.com sometimes w/o expires of any kind
+  * adapter_fictionlive: Soup chapter text to fix up HTML
+  * Add style attr by default to fiction.live
+
+-------------------------------------------------------------------

Old:
----
  FanFicFare-4.20.0.tar.gz

New:
----
  FanFicFare-4.21.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-fanficfare.spec ++++++
--- /var/tmp/diff_new_pack.klt6ob/_old  2023-03-03 22:31:32.800066927 +0100
+++ /var/tmp/diff_new_pack.klt6ob/_new  2023-03-03 22:31:32.804066944 +0100
@@ -20,13 +20,13 @@
 %define modnamedown fanficfare
 %define skip_python2 1
 Name:           python-fanficfare
-Version:        4.20.0
+Version:        4.21.0
 Release:        0
 Summary:        Tool for making eBooks from stories on fanfiction and other 
web sites
 License:        GPL-3.0-only
 Group:          Development/Languages/Python
 URL:            https://github.com/JimmXinu/FanFicFare
-Source:         
https://github.com/JimmXinu/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz
+Source:         
https://github.com/JimmXinu/FanFicFare/archive/v%{version}/FanFicFare-%{version}.tar.gz
 # PATCH-FEATURE-OPENSUSE adapter_dwiggiecom.patch gh#JimmXinu/FanFicFare#903 
mc...@suse.com
 # adapter for dwiggie.com, which is probably not for upstream
 Patch0:         adapter_dwiggiecom.patch

++++++ FanFicFare-4.20.0.tar.gz -> FanFicFare-4.21.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FanFicFare-4.20.0/calibre-plugin/__init__.py 
new/FanFicFare-4.21.0/calibre-plugin/__init__.py
--- old/FanFicFare-4.20.0/calibre-plugin/__init__.py    2023-02-02 
17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/calibre-plugin/__init__.py    2023-03-01 
18:22:40.000000000 +0100
@@ -33,7 +33,7 @@
 from calibre.customize import InterfaceActionBase
 
 # pulled out from FanFicFareBase for saving in prefs.py
-__version__ = (4, 20, 0)
+__version__ = (4, 21, 0)
 
 ## Apparently the name for this class doesn't matter--it was still
 ## 'demo' for the first few versions.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FanFicFare-4.20.0/calibre-plugin/fff_plugin.py 
new/FanFicFare-4.21.0/calibre-plugin/fff_plugin.py
--- old/FanFicFare-4.20.0/calibre-plugin/fff_plugin.py  2023-02-02 
17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/calibre-plugin/fff_plugin.py  2023-03-01 
18:22:40.000000000 +0100
@@ -2209,7 +2209,7 @@
             if not data['editable']:
                 logger.debug("Skipping custom column(%s) update, column is set 
editable=False"%label)
             else:
-                raise_exception(meta,val,label,e)
+                raise_exception(meta,val,label,ve)
         except Exception as e:
             raise_exception(meta,val,label,e)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FanFicFare-4.20.0/calibre-plugin/plugin-defaults.ini 
new/FanFicFare-4.21.0/calibre-plugin/plugin-defaults.ini
--- old/FanFicFare-4.20.0/calibre-plugin/plugin-defaults.ini    2023-02-02 
17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/calibre-plugin/plugin-defaults.ini    2023-03-01 
18:22:40.000000000 +0100
@@ -341,7 +341,9 @@
 
 ## Literal strings can be set into custom columns using double quotes.
 ## Each metadata=>column mapping must be on a separate line and each
-## needs to have one space at the start of each line.
+## needs to have one space at the start of each line.  There is also a
+## special case for Integer and Float type custom columns: The static
+## value "None" will clear the column.
 
 ## 'r_anthaver' and 'n_anthaver' can be used to indicate the same as
 ## 'r' and 'n' for normal downloads, but to average the metadata for
@@ -830,7 +832,7 @@
 ## version in the first chapter gets out of sync.
 ##
 ## If always_reload_first_chapter:true, then the first chapter will
-## always be downloaded again (ie, reloaded).  It will NOT be maked
+## always be downloaded again (ie, reloaded).  It will NOT be marked
 ## '(new)' (see mark_new_chapters).  Because it is reloaded, manual
 ## edits made to the first chapter will be lost.
 ##
@@ -1944,6 +1946,8 @@
 reader_input_label:Reader Input
 keep_in_order_tags:true
 
+add_to_keep_html_attrs:,style
+
 add_to_output_css:
  table.voteblock { border-collapse: collapse; }
  td { padding: 0.5em; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/FanFicFare-4.20.0/fanficfare/adapters/adapter_archiveofourownorg.py 
new/FanFicFare-4.21.0/fanficfare/adapters/adapter_archiveofourownorg.py
--- old/FanFicFare-4.20.0/fanficfare/adapters/adapter_archiveofourownorg.py     
2023-02-02 17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/fanficfare/adapters/adapter_archiveofourownorg.py     
2023-03-01 18:22:40.000000000 +0100
@@ -41,9 +41,8 @@
         self.is_adult=False
         self.addurl = ""
 
-        self.full_work_soup = None
-        self.full_work_chapters = None
-        self.use_full_work_soup = True
+        self.full_work_data = None
+        self.use_full_work_data = True
 
         # get storyId from url--url validation guarantees query is only 
sid=1234
         self.story.setMetadata('storyId',self.parsedUrl.path.split('/',)[2])
@@ -424,26 +423,27 @@
 
         whole_dl_soup = chapter_dl_soup = None
 
-        if self.use_full_work_soup and 
self.getConfig("use_view_full_work",True) and self.num_chapters() > 1:
+        if self.use_full_work_data and 
self.getConfig("use_view_full_work",True) and self.num_chapters() > 1:
             logger.debug("USE view_full_work")
             ## Assumed view_adult=true was cookied during metadata
-            if not self.full_work_soup:
-                self.full_work_soup = 
self.make_soup(self.get_request(self.url+"?view_full_work=true"+self.addurl.replace('?','&')))
-                ## AO3 has had several cases now where chapter numbers
-                ## are missing, breaking the link between
-                ## <div id=chapter-##> and Chapter ##.
-                ## But they should all still be there and in the right
-                ## order, so array[index]
-                self.full_work_chapters = 
self.full_work_soup.find_all('div',{'id':re.compile(r'chapter-\d+')})
-                if len(self.full_work_chapters) != self.num_chapters():
-                    ## sanity check just in case.
-                    self.use_full_work_soup = False
-                    self.full_work_soup = None
-                    logger.warning("chapter count in view_full_work(%s) 
disagrees with num of chapters(%s)--ending 
use_view_full_work"%(len(self.full_work_chapters),self.num_chapters()))
-            whole_dl_soup = self.full_work_soup
+            if not self.full_work_data:
+                self.full_work_data = 
self.get_request(self.url+"?view_full_work=true"+self.addurl.replace('?','&'))
+            ## AO3 has had several cases now where chapter numbers are
+            ## missing, breaking the link between <div id=chapter-##>
+            ## and Chapter ##.  But they should all still be there and
+            ## in the right order, so array[index].  Checked on every
+            ## chapter now, even tho only needed once.
+            whole_dl_soup = self.make_soup(self.full_work_data)
+            work_chapters = 
whole_dl_soup.find_all('div',{'id':re.compile(r'chapter-\d+')})
+            if len(work_chapters) != self.num_chapters():
+                ## sanity check just in case.
+                self.use_full_work_data = False
+                self.full_work_data = None
+                whole_dl_soup = None
+                logger.warning("chapter count in view_full_work(%s) disagrees 
with num of chapters(%s)--ending 
use_view_full_work"%(len(work_chapters),self.num_chapters()))
 
         if whole_dl_soup:
-            chapter_dl_soup = self.full_work_chapters[index]
+            chapter_dl_soup = work_chapters[index]
         else:
             whole_dl_soup = chapter_dl_soup = 
self.make_soup(self.get_request(url+self.addurl))
             if None == chapter_dl_soup:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/FanFicFare-4.20.0/fanficfare/adapters/adapter_fictionlive.py 
new/FanFicFare-4.21.0/fanficfare/adapters/adapter_fictionlive.py
--- old/FanFicFare-4.20.0/fanficfare/adapters/adapter_fictionlive.py    
2023-02-02 17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/fanficfare/adapters/adapter_fictionlive.py    
2023-03-01 18:22:40.000000000 +0100
@@ -36,6 +36,8 @@
 import logging
 logger = logging.getLogger(__name__)
 
+# __package__ = 'fanficfare.adapters' # fixes dev issues with unknown package 
base
+
 from .base_adapter import BaseSiteAdapter
 from ..htmlcleanup import stripHTML
 from .. import exceptions as exceptions
@@ -309,9 +311,10 @@
 
             text += "</div><br />\n"
 
-        return text
+        ## soup to repair the most egregious HTML errors.
+        return self.utf8FromSoup(url,self.make_soup(text))
 
-    ### everything from here out is chunk data handling.
+    ### everything from here out is chunk data handling. 
 
     def format_chapter(self, chunk):
         """Handles any formatting in the chapter body text for text chapters.
@@ -326,8 +329,7 @@
         if self.achievements:
             soup = self.append_achievments(soup)
 
-        # utf8FromSoup does important processing e.g. sanitization and 
imageurl extraction
-        return self.utf8FromSoup(self.url, soup)
+        return str(soup) 
 
     def add_spoiler_legends(self, soup):
         # find spoiler links and change link-anchor block to legend block
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/FanFicFare-4.20.0/fanficfare/adapters/adapter_royalroadcom.py 
new/FanFicFare-4.21.0/fanficfare/adapters/adapter_royalroadcom.py
--- old/FanFicFare-4.20.0/fanficfare/adapters/adapter_royalroadcom.py   
2023-02-02 17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/fanficfare/adapters/adapter_royalroadcom.py   
2023-03-01 18:22:40.000000000 +0100
@@ -162,7 +162,7 @@
             raise exceptions.StoryDoesNotExist(self.url)
 
         ## Title
-        title = soup.select_one('.fic-header h1[property=name]').text
+        title = soup.select_one('.fic-header h1').text
         self.story.setMetadata('title',title)
 
         # Find authorid and URL from... author url.
@@ -190,14 +190,13 @@
                     chapter_id = match.group(1)
                     self.chapterURLIndex[chapter_id] = len(self.chapterUrls) - 
1
 
-        # this is forum based so it's a bit ugly
-        description = soup.find('div', {'property': 'description', 'class': 
'hidden-content'})
+        description = soup.select_one('div.description div.hidden-content')
         self.setDescription(url,description)
 
         self.story.setMetadata('dateUpdated', self.make_date(tds[-1][1]))
         self.story.setMetadata('datePublished', self.make_date(tds[0][1]))
 
-        for a in soup.find_all('a',{'property':'genre'}): # not all stories 
have genre
+        for a in soup.find_all('a',{'class':'fiction-tag'}): # not all stories 
have genre
             genre = stripHTML(a)
             if not "Unspecified" in genre:
                 self.story.addToList('genre',genre)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/FanFicFare-4.20.0/fanficfare/adapters/adapter_thesietchcom.py 
new/FanFicFare-4.21.0/fanficfare/adapters/adapter_thesietchcom.py
--- old/FanFicFare-4.20.0/fanficfare/adapters/adapter_thesietchcom.py   
2023-02-02 17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/fanficfare/adapters/adapter_thesietchcom.py   
2023-03-01 18:22:40.000000000 +0100
@@ -16,6 +16,8 @@
 #
 
 from __future__ import absolute_import
+import logging
+logger = logging.getLogger(__name__)
 
 # py2 vs py3 transition
 from ..six import text_type as unicode
@@ -43,9 +45,6 @@
         # in case it needs more than just site/
         return '/index.php?'
 
-    def get_threadmarks_top(self,souptag):
-        return souptag.select_one('div.block-outer-main--threadmarks')
-
     def make_reader_url(self,tmcat_num,reader_page_num):
         # 
https://www.the-sietch.com/index.php?threads/shattered-sphere-the-arcadian-free-march.3243/reader/page-2
         # discard tmcat_num -- the-sietch.com doesn't have multiple
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/FanFicFare-4.20.0/fanficfare/browsercache/base_browsercache.py 
new/FanFicFare-4.21.0/fanficfare/browsercache/base_browsercache.py
--- old/FanFicFare-4.20.0/fanficfare/browsercache/base_browsercache.py  
2023-02-02 17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/fanficfare/browsercache/base_browsercache.py  
2023-03-01 18:22:40.000000000 +0100
@@ -23,9 +23,18 @@
     # py3 only, calls C libraries. CLI
     import brotli
 except ImportError:
-    # Calibre doesn't include brotli, so use plugin packaged
-    # brotlidecpy, which is slower, but pure python
-    from calibre_plugins.fanficfare_plugin import brotlidecpy as brotli
+    try:
+        # Calibre doesn't include brotli, so use plugin packaged
+        # brotlidecpy, which is slower, but pure python
+        from calibre_plugins.fanficfare_plugin import brotlidecpy as brotli
+    except ImportError:
+        # Included for benefit of A-Shell for iOS users.  They need to
+        # install brotlidecpy themselves and override pip to install
+        # FFF without brotli
+        # See:
+        # https://github.com/JimmXinu/FanFicFare/issues/919
+        # https://github.com/sidney/brotlidecpy
+        import brotlidecpy as brotli
 
 import logging
 logger = logging.getLogger(__name__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/FanFicFare-4.20.0/fanficfare/browsercache/chromagnon/cacheParse.py 
new/FanFicFare-4.21.0/fanficfare/browsercache/chromagnon/cacheParse.py
--- old/FanFicFare-4.20.0/fanficfare/browsercache/chromagnon/cacheParse.py      
2023-02-02 17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/fanficfare/browsercache/chromagnon/cacheParse.py      
2023-03-01 18:22:40.000000000 +0100
@@ -92,7 +92,8 @@
             addr = struct.unpack('I', index.read(4))[0]
             # Checking if the address is initialized (i.e. used)
             if addr & 0x80000000 == 0:
-                print("%s is not in the cache" % url)
+                # print("%s is not in the cache" % url)
+                pass
 
             # Follow the chained list in the bucket
             else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FanFicFare-4.20.0/fanficfare/cli.py 
new/FanFicFare-4.21.0/fanficfare/cli.py
--- old/FanFicFare-4.20.0/fanficfare/cli.py     2023-02-02 17:29:04.000000000 
+0100
+++ new/FanFicFare-4.21.0/fanficfare/cli.py     2023-03-01 18:22:40.000000000 
+0100
@@ -28,7 +28,7 @@
 import os, sys, platform
 
 
-version="4.20.0"
+version="4.21.0"
 os.environ['CURRENT_VERSION_ID']=version
 
 global_cache = 'global_cache'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FanFicFare-4.20.0/fanficfare/defaults.ini 
new/FanFicFare-4.21.0/fanficfare/defaults.ini
--- old/FanFicFare-4.20.0/fanficfare/defaults.ini       2023-02-02 
17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/fanficfare/defaults.ini       2023-03-01 
18:22:40.000000000 +0100
@@ -832,7 +832,7 @@
 ## version in the first chapter gets out of sync.
 ##
 ## If always_reload_first_chapter:true, then the first chapter will
-## always be downloaded again (ie, reloaded).  It will NOT be maked
+## always be downloaded again (ie, reloaded).  It will NOT be marked
 ## '(new)' (see mark_new_chapters).  Because it is reloaded, manual
 ## edits made to the first chapter will be lost.
 ##
@@ -1950,6 +1950,8 @@
 reader_input_label:Reader Input
 keep_in_order_tags:true
 
+add_to_keep_html_attrs:,style
+
 add_to_output_css:
  table.voteblock { border-collapse: collapse; }
  td { padding: 0.5em; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/FanFicFare-4.20.0/fanficfare/fetchers/fetcher_flaresolverr_proxy.py 
new/FanFicFare-4.21.0/fanficfare/fetchers/fetcher_flaresolverr_proxy.py
--- old/FanFicFare-4.20.0/fanficfare/fetchers/fetcher_flaresolverr_proxy.py     
2023-02-02 17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/fanficfare/fetchers/fetcher_flaresolverr_proxy.py     
2023-03-01 18:22:40.000000000 +0100
@@ -191,7 +191,11 @@
         ## (current global_cookie/
         expireKey = 'expires' if 'expires' in c else 'expiry'
         # logger.debug("expireKey:%s"%expireKey)
-        if c[expireKey] > 30000000000:
+        # logger.debug(c)
+        ## novelfull.com sometimes w/o expires of any kind
+        if expireKey not in c:
+            c[expireKey] = 0
+        elif c[expireKey] > 30000000000:
             c[expireKey] = 30000000000
             # logger.debug(c['name'])
             # import datetime
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FanFicFare-4.20.0/setup.py 
new/FanFicFare-4.21.0/setup.py
--- old/FanFicFare-4.20.0/setup.py      2023-02-02 17:29:04.000000000 +0100
+++ new/FanFicFare-4.21.0/setup.py      2023-03-01 18:22:40.000000000 +0100
@@ -26,7 +26,7 @@
     name=package_name,
 
     # Versions should comply with PEP440.
-    version="4.20.0",
+    version="4.21.0",
 
     description='A tool for downloading fanfiction to eBook formats',
     long_description=long_description,

Reply via email to