mirror of
https://git.wownero.com/wowlet/wowlet-backend.git
synced 2024-08-15 01:03:13 +00:00
Initial commit
This commit is contained in:
commit
7785d5befe
16 changed files with 8344 additions and 0 deletions
22
utils/generate_heights_db.py
Normal file
22
utils/generate_heights_db.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright (c) 2020, The Monero Project.
|
||||
# Copyright (c) 2020, dsc@xmr.pm
|
||||
|
||||
import re, os, sys, requests
|
||||
|
||||
current_height = 664767
|
||||
f = open("heights.txt", "a")
|
||||
for i in range(0, current_height, 1500):
|
||||
if i == 0:
|
||||
i = 1
|
||||
if i % (1500*8) == 0:
|
||||
print(f"[*] {current_height-i}")
|
||||
|
||||
url = f"https://stagenet.xmrchain.net/block/{i}"
|
||||
resp = requests.get(url, headers={"User-Agent": "Feather"})
|
||||
resp.raise_for_status()
|
||||
content = resp.content.decode()
|
||||
timestamp = wow = re.findall(r"\((\d{10})\)", content)[0]
|
||||
f.write(f"{i}:{timestamp}\n")
|
||||
|
||||
f.close()
|
Loading…
Add table
Add a link
Reference in a new issue