Skip to content

Commit

Permalink
Implement #544
Browse files Browse the repository at this point in the history
  • Loading branch information
Nandaka committed Nov 1, 2019
1 parent f132a60 commit 1d64888
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PixivBrowserFactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import cookielib
import httplib
import json
import mechanize
import re
import socket
import sys
import time
import urllib
import urllib2
import urlparse
import mechanize
from BeautifulSoup import BeautifulSoup

import demjson
Expand Down
9 changes: 7 additions & 2 deletions PixivModelFanbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ class FanboxPost(object):
worksDate = ""
worksDateDateTime = None
updatedDatetime = ""
# image|text|file|article|video
# image|text|file|article|video|entry
_supportedType = ["image", "text", "file", "article", "video", "entry"]
type = ""
body_text = ""
images = None
Expand All @@ -103,7 +104,6 @@ class FanboxPost(object):
bookmark_count = 0
image_response_count = 0

_supportedType = ["image", "text", "file", "article", "video"]
embeddedFiles = None
provider = None

Expand Down Expand Up @@ -154,6 +154,11 @@ def parseBody(self, jsPost):
embedData = list()
if jsPost["body"].has_key("text"):
self.body_text = jsPost["body"]["text"]
# Issue #544
elif jsPost["body"].has_key("html"):
self.body_text = jsPost["body"]["html"]
if jsPost["body"].has_key("thumbnailUrl") and jsPost["body"]["thumbnailUrl"] is not None:
self.embeddedFiles.append(jsPost["body"]["thumbnailUrl"])

# Issue #438
if jsPost["body"].has_key("imageMap") and jsPost["body"]["imageMap"] is not None:
Expand Down

0 comments on commit 1d64888

Please sign in to comment.