This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Description
get_unspents("19SbDasdasdNEkwRqnBAv7Ewumy7XcCau9Wp4BH9")
Expected behavior:
result: [ ]
Actual behavior:
result: Exception('Invalid response from blockchain.info.')
Reson:
blockchain.info returns non-JSON response "No free outputs to spend" if the address is valid but with no unspents. The file "blockchain_info.py" (at lines 49 to 53) doesn't check for non-JSON responses but blatantly returns error if it cannot parse JSON content.
Proposed fix:
at line 50:
if r.content == "No free outputs to spend": return [ ]