OpenSea-NFT-Stealer
OpenSea-NFT-Stealer copied to clipboard
Only downloads the first 22 NFTs
Only downloads the first 22 NFTs in the Bored Ape Yacht Club collection
not every nft has image_original_url in the json so that makes it stop.
Probably not a clean way but this workaround worked for me: I replaced this part of code:
# Make the request to the URL to get the image
if not asset["image_original_url"] == None:
image = requests.get(asset["image_original_url"])
else:
image = requests.get(asset["image_url"])
with this one:
# Make the request to the URL to get the image
if not asset["image_url"] is None:
image = requests.get(asset["image_url"])
With this change image could end up being undefined, but works goog enough to make a quick big nft heist.
Same problem. The script was fine until yesterday, but now is failing all time
Probably not a clean way but this workaround worked for me: I replaced this part of code:
# Make the request to the URL to get the image if not asset["image_original_url"] == None: image = requests.get(asset["image_original_url"]) else: image = requests.get(asset["image_url"])
with this one:
# Make the request to the URL to get the image if not asset["image_url"] is None: image = requests.get(asset["image_url"])
With this change image could end up being undefined, but works goog enough to make a quick big nft heist.
Dude, you are GOD
Hi,
By changing the script as NtekShadow commented ran well but the quality of pngs gone down. Not a problem at all.
But now, is impossible to achieve or run the script, all time says this:
Traceback (most recent call last):
File "c:/Documents/GitHub/OpenSea-NFT-Stealer/opensea.py", line 60, in
In windows and in MacOS
@Salro1g 1: It only downloads the standart quality pictures after changing the code, since not all nft provide a Original quality link to get the pic and that stopped the original code from executing once it hit such a picture. like i said, its not a nice or the best solution
2: I get the same problem too now, my best guess is that they changed something with their api to prevent mass download of the nfts. Or it could be a temporary problem. i can get the json directly but not in the python program
from the OpenSea API Twitter: "[status] Investigation: Due to increased site load, programmatic acces to orders has been temporarily disabled."
officialy it has been resolved but yea started arround the time where they resolved it for me
https://status.opensea.io/
@Salro1g Got it working again first define headers with a user client like this:
headers = {
'User-Agent': 'Put the userclient you want to use in here'
}
you can find a userclient name on here: https://www.whatismybrowser.com/guides/the-latest-user-agent/
then change the request.get in the first for loop for data to include the headers:
data = json.loads(requests.get(
f"https://api.opensea.io/api/v1/assets?order_direction=asc&offset={offset}"
f"&limit=50&collection={CollectionName}&format=json", headers=headers).content.decode())
and it should work again.