From 5bc8cb3a40d008945bf90a5fc0ddaeebe3210e29 Mon Sep 17 00:00:00 2001 From: Satoshi Nakamoto <65907137+SatoshiNakamotoBitcoin@users.noreply.github.com> Date: Fri, 22 Sep 2023 20:13:49 +0200 Subject: [PATCH] Update spvblock.py --- pybitblock/SPV/spvblock.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pybitblock/SPV/spvblock.py b/pybitblock/SPV/spvblock.py index 8f4bfcb..6e9390c 100644 --- a/pybitblock/SPV/spvblock.py +++ b/pybitblock/SPV/spvblock.py @@ -643,7 +643,7 @@ def pgpConn(): def mtConn(): # here we convert the result of the command 'getblockcount' on a random art design while True: try: - conn = """curl -s https://bitcoinexplorer.org/api/price/sats | jq -C | grep -E "usd" | awk '{print $2}' | tr -d '"' | tr -d ','""" + conn = """curl -s https://bitcoinexplorer.org/api/price/sats | jq -C '.[]' | head -n 1""" a = os.popen(conn).read() clear() blogo() @@ -660,7 +660,7 @@ def mtConn(): # here we convert the result of the command 'getblockcount' on a r def mtclock(): try: - conn = """curl -s https://bitcoinexplorer.org/api/price/sats | jq -C | grep -E "usd" | awk '{print $2}' | tr -d '"' | tr -d ','""" + conn = """curl -s https://bitcoinexplorer.org/api/price/sats | jq -C '.[]' | head -n 1""" a = os.popen(conn).read() clear() blogo() @@ -669,9 +669,6 @@ def mtclock(): outputT = render(f"{a} O'Clock", colors=['green'], align='center', font='tiny') print(output) print(outputT) - clear() - close() - mtConn() except: pass #-----------------------------END MT--------------------------------