muzuiget / niconvert

弹幕转换工具
252 stars 33 forks source link

color 'undefined' #34

Closed Ch1cC closed 2 years ago

Ch1cC commented 2 years ago

niconvert-master\niconvert\libsite\bilibili.py", line 25, in _raw 'color': int(attrs[3]), ValueError: invalid literal for int() with base 10: 'undefined'

print(attrs) ['64.668', '1', '25', 'undefined', '1506859710', '1', '3ad3c7aa', '23835664667639810']

Ch1cC commented 2 years ago

【爱情_动画】你的名字。【2016】..126654047.xml.zip

muzuiget commented 2 years ago

https://github.com/muzuiget/niconvert/commit/94a4ccb0dd029c47e7cf59de996ef2167181fdff

undefined 映射为 0xffffff 白色值即可。

Ch1cC commented 2 years ago

我在

def _color(self):
        color =self.raw['color']
        if(color!='undefined'):
            return int(color)
        return int(颜色)

进行了修改, props 中直接取用了原始值

muzuiget commented 2 years ago

也可以。

Ch1cC commented 2 years ago

👍