Skip to content

Instantly share code, notes, and snippets.

@gfenney
Forked from sudo-owen/update_opensea.py
Last active February 24, 2023 10:30
Show Gist options
  • Save gfenney/b213999d9e513f2deed467ca36676419 to your computer and use it in GitHub Desktop.
Save gfenney/b213999d9e513f2deed467ca36676419 to your computer and use it in GitHub Desktop.
Update OpenSea metadata
import requests
import time
# change the address here to be your desired NFT
url = "https://api.opensea.io/asset/0x772c9181b0596229ce5ba898772ce45188284379/"
update_flag = "/?force_update=true"
ids = [ i for i in range(2604, 2633)]
for i in ids:
req_url = url + str(i) + update_flag
r = requests.get(req_url)
print(i, r.status_code)
time.sleep(0.3)
ids = [ i for i in range(3913, 3942)]
for i in ids:
req_url = url + str(i) + update_flag
r = requests.get(req_url)
print(i, r.status_code)
time.sleep(0.3)
ids = [ i for i in range(6336, 6365)]
for i in ids:
req_url = url + str(i) + update_flag
r = requests.get(req_url)
print(i, r.status_code)
time.sleep(0.3)
@rcaloras
Copy link

rcaloras commented Jan 6, 2023

Another solution via the developer console for Polygon: https://gist.github.com/rcaloras/95bcd4e83cb17ff40d28e8d51fc2e0df

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment