|
crypto_info = code_obj.co_consts[code[(8 if case1 else 14) + 1]] |
It seems that there is only one bytes value in code_obj.co_consts, so it might be easier to search by type instead of using hardcoded positions
(may need confirmation from others, but the above worked for me when ran against v8.5 and Python 3.11)