You are viewing a single comment's thread from:
RE: Notice of upcoming changes to anyx.io API
Can you check uft-8 support on your API server?
from beem import Steem
stm = Steem("https://anyx.io")
from beem.block import Block
b = Block(35097419, steem_instance=stm)
print(b.operations[-22]["value"]["title"])
returns:
<스파ì�´ë�”맨 : 파 프롬 홈> ë¸”ë£¨ì—”ì ¤ 니어 프롬 (퓨처) 홈 💙
whereas
from beem import Steem
stm = Steem("https://api.steemit.com")
from beem.block import Block
b = Block(35097419, steem_instance=stm)
print(b.operations[-22]["value"]["title"])
returns
<스파이더맨 : 파 프롬 홈> 블루엔젤 니어 프롬 (퓨처) 홈 💙
You've done something wrong in beem; likely you've assumed data in steem operations is always uft-8. It is not guaranteed to be so.
I believe Jussi re-formats steem data to be uft-8. This is not a good thing, it means they alter the inline data, and by doing so, the signature of the transaction will no longer match.
My implementation returns the exact result as you would get if you ran it against a steemd node directly.
A good json parser, like jq, understands things fine. Your example in jq would be:
As you can see with this, the result is parsed correctly.
I suggest you try running beem against a steemd node directly to better debug your issue. As an example; the md5sum of the block you have is as reported as follows:
Thanks a lot, this will definitely help me fixing this issue on beem.
Posted using Partiko Android