mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-05 02:51:48 +02:00
more py2/py3 fixes
This commit is contained in:
parent
a97b2d347e
commit
a893bdff92
3 changed files with 5 additions and 4 deletions
|
|
@ -20,6 +20,9 @@ import json
|
|||
import logging
|
||||
import re
|
||||
|
||||
# py2 vs py3 transition
|
||||
from ..six import text_type as unicode
|
||||
|
||||
from .base_adapter import BaseSiteAdapter, makeDate
|
||||
from .. import exceptions as exceptions
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
@ -46,7 +49,7 @@ class WattpadComAdapter(BaseSiteAdapter):
|
|||
try:
|
||||
WattpadComAdapter.CATEGORY_DEFs = json.loads(self._fetchUrl(WattpadComAdapter.API_GETCATEGORIES))
|
||||
except:
|
||||
logger.debug('API_GETCATEGORIES failed.')
|
||||
logger.warn('API_GETCATEGORIES failed.')
|
||||
WattpadComAdapter.CATEGORY_DEFs = []
|
||||
|
||||
@staticmethod
|
||||
|
|
@ -88,7 +91,7 @@ class WattpadComAdapter(BaseSiteAdapter):
|
|||
def doExtractChapterUrlsAndMetadata(self, get_cover=True):
|
||||
try:
|
||||
storyInfo = json.loads(self._fetchUrl(WattpadComAdapter.API_STORYINFO % self.storyId))
|
||||
logger.debug('storyInfo: %s' % json.dumps(storyInfo))
|
||||
# logger.debug('storyInfo: %s' % json.dumps(storyInfo))
|
||||
except Exception:
|
||||
raise exceptions.InvalidStoryURL(self.url, self.getSiteDomain(), self.getSiteExampleURLs())
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import types
|
|||
|
||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||
__version__ = "1.11.0fff" # for version included in fanficfare
|
||||
print("fff six")
|
||||
|
||||
# Useful for very coarse version differentiation.
|
||||
PY2 = sys.version_info[0] == 2
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import types
|
|||
|
||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||
__version__ = "1.11.0fffinclib" # for version included in fanficfare
|
||||
print("included_dependencies six")
|
||||
|
||||
# Useful for very coarse version differentiation.
|
||||
PY2 = sys.version_info[0] == 2
|
||||
|
|
|
|||
Loading…
Reference in a new issue