Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- import requests
- def main():
- url = 'http://localhost:13331/'
- body = {
- 'jsonrpc': '2.0',
- 'method': 'getfoundblocks',
- 'id': 'foo',
- }
- blocks = requests.post(url, json=body).json()
- for block in blocks['result']['hashes'][-5:]:
- print(
- '<a target="_blank" href="https://explorer.snowblossom.org/?search={}">{}</a>'
- .format(block, block)
- )
- if __name__ == '__main__':
- main()
- # EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement