ness:emercoin-value.py
- Status
- active, expires in 529,731 blocks (~3,027 days)
- Owner
- em1qyx8vay5rrfd5pml8e03gsw7pxh7p55pgc5a4fh
- Expires at
- block 1348072
- Last change
- b293e9816459…332de9380e44
Value
import sys␊import json␊import re␊def extract_value(text):␊ try:␊ # Remove non-printable characters (including BOM) and trim whitespace␊ cleaned_text = re.sub(r'[^\x20-\x7E]+', '', text).strip()␊ # Try to parse JSON after cleaning␊ data = json.loads(cleaned_text)␊ # Extract and return the 'value' field␊ return data.get("value", "No 'value' found")␊ except json.JSONDecodeError:␊ return f"Invalid JSON input: {cleaned_text}"␊if __name__ == "__main__":␊ if len(sys.argv) > 1:␊ text = sys.argv[1]␊ else:␊ text = sys.stdin.read()␊ print(extract_value(text))
History