diff --git a/danmaku2ass.py b/danmaku2ass.py index 4d02050..29c51a4 100755 --- a/danmaku2ass.py +++ b/danmaku2ass.py @@ -151,9 +151,11 @@ def ReadCommentsNiconico(f, fontsize): def ReadCommentsAcfun(f, fontsize): - comment_element = json.load(f) + #comment_element = json.load(f) # after load acfun comment json file as python list, flatten the list - comment_element = [c for sublist in comment_element for c in sublist] + #comment_element = [c for sublist in comment_element for c in sublist] + comment_elements = json.load(f) + comment_element = comment_elements[2] for i, comment in enumerate(comment_element): try: p = str(comment['c']).split(',')