mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-24 17:53:46 +01:00
Improve image support for a couple of obscure cases.
This commit is contained in:
parent
b31b497698
commit
1d474f6493
1 changed files with 10 additions and 1 deletions
|
|
@ -74,6 +74,9 @@ except:
|
|||
export = True
|
||||
|
||||
if normalize_format_name(img.format) != "jpg":
|
||||
if img.mode == "P":
|
||||
# convert pallete gifs to RGB so jpg save doesn't fail.
|
||||
img = img.convert("RGB")
|
||||
export = True
|
||||
|
||||
if export:
|
||||
|
|
@ -298,11 +301,17 @@ class Story:
|
|||
url,
|
||||
'','',''))
|
||||
else:
|
||||
toppath=""
|
||||
if parsedUrl.path.endswith("/"):
|
||||
toppath = parsedUrl.path
|
||||
else:
|
||||
toppath = parsedUrl.path[:parsedUrl.path.rindex('/')]
|
||||
imgurl = urlparse.urlunparse(
|
||||
(parsedUrl.scheme,
|
||||
parsedUrl.netloc,
|
||||
parsedUrl.path + url,
|
||||
toppath + '/' + url,
|
||||
'','',''))
|
||||
#print("\n===========\nparsedUrl.path:%s\ntoppath:%s\nimgurl:%s\n\n"%(parsedUrl.path,toppath,imgurl))
|
||||
|
||||
prefix='ffdl'
|
||||
if imgurl not in self.imgurls:
|
||||
|
|
|
|||
Loading…
Reference in a new issue