I would suggest using get_config() API function instead that will give you
`"STEEMIT_VOTE_REGENERATION_SECONDS": 432000,
This is a number of seconds (five days currently) required for your voting power to go from 0 to 10000. Your logic is equivalent, but in case this parameter ever changes, you won't need to rewrite your code.
RE: Incorrect Voting Power Returned Steempy (and possibly other libraries) [Workaround]