Add improvments.

pull/922/head
Andrey 2023-09-11 17:27:03 +03:00
rodzic d07ec13bf6
commit bb4bc7f778
2 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -55,7 +55,10 @@ def crawl_uri(metadata_uri: str) -> Any:
try:
response = urllib.request.urlopen(metadata_uri, timeout=10)
if response.status == 200:
if (
metadata_uri.startswith("data:application/json")
or response.status == 200
):
result = json.loads(response.read())
break
retry += 1

Wyświetl plik

@ -132,6 +132,7 @@ def get_current_metadata_for_address(
WHERE
address = :address
AND label = :label
AND label_data ->>'metadata' != 'null'
ORDER BY
label_data ->> 'token_id' ASC,
block_number :: INT DESC;