Merge branch 'hotfix/fix_color'

This commit is contained in:
taizan-hokuto
2020-07-24 22:43:09 +09:00
3 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
pytchat is a lightweight python library to browse youtube livechat without Selenium or BeautifulSoup.
"""
__copyright__ = 'Copyright (C) 2019 taizan-hokuto'
__version__ = '0.1.1'
__version__ = '0.1.2'
__license__ = 'MIT'
__author__ = 'taizan-hokuto'
__author_email__ = '55448286+taizan-hokuto@users.noreply.github.com'

View File

@@ -21,7 +21,7 @@ class LiveChatPaidStickerRenderer(BaseRenderer):
self.amountString = amountDisplayString
self.currency = currency.symbols[symbol]["fxtext"] if currency.symbols.get(
symbol) else symbol
self.bgColor = self.renderer.get("moneyChipBackgroundColor", 0)
self.bgColor = self.renderer.get("backgroundColor", 0)
self.sticker = "".join(("https:",
self.renderer["sticker"]["thumbnails"][0]["url"]))
self.colors = self.get_colors()

View File

@@ -136,7 +136,7 @@ def test_supersticker(mocker):
assert ret.amountValue == 200
assert ret.amountString == "¥200"
assert ret.currency == "JPY"
assert ret.bgColor == 4278248959
assert ret.bgColor == 4278237396
assert ret.sticker == "https://lh3.googleusercontent.com/param_s=s72-rp"
assert ret.author.name == "author_name"
assert ret.author.channelId == "author_channel_id"