Hey everyone, I created a Custom selenium python script borrowing bits and pieces from the Maxime OpenSea Auto Uploader script. I had tried using his script as it was, but I ran into many issues, probably mostly user error on my part (who knows)
Anyway, here it is... it only works with Json files currently because that's what i needed. This project was built more around my own needs and is uploaded to this repo in that way as well... It's NOT going to work for everyone, and you'll very highly likely need to modify the code to get it to work with your project. I'm sure that i could do some things to make it more user friendly...
On the other hand, when i wrote it, it wasn't really designed to be the most user friendly or fully featured, its just a wham-bam thank you ma'am sorta "Git'er Done" kinda project.
Changes might come down the road, but for the time being, if you're using multiple json files to upload to opensea, this should work for you (with a little elbow grease).
The way its supposed to work is, after setting up the folders and files, you add your Json files to the Data folder... you don't use the single Master Json file that's generated from say, the hashlips generator for instance... you would instead use the individual numbered json files. Add as many of those as you want to the data folder, and then run the script and once it starts it'll log into your metamask, go to to opensea, create an NFT (add properties, collection, set which blockchain, etc), it will then MINT that NFT and then LIST the NFT for whatever price set in the Json file... it will then go on to the next Json file in the data folder and do the same process for that until it has gone through all Json files.
Let me know what you think, and how i could improve my code. I'm open to hearing feedback and welcome changes.
➜ Feel free to support the dev of this repo if it has helped you out in your NFT journey and you feel like giving back (THANK YOU):
➜ 0x8736ee29f772b9a972547c228a5f43e427e783ae (Ethereum).
➜ Check out one of my collections on OpenSea if you feel like it Kurt At Work.
➜ Check out yet another one of my collections on OpenSea if you feel like it Let's Go Brandon NFT.
➜ Check out another of my collections on OpenSea if you feel like it SeaSlug Called Jamulous.
This script allows you to upload and sell as many NFTs as you want to Opensea, all automatically and quickly (about 2 NFTs per minute) with metadata integrated, and Ethereum and Polygon Blockchains are supported.
You can decide whether you want to upload or sell your NFTs, or both. Currently this code has a hard coded schedule of a 6 month sales listing (the old code was breaking at this point so i figured an easy fix was to just comment out that line of code and let the default value do its thing, since what I wanted was the default anyway)
git clone https://github.com/kurtatwork/KurtAtWork-OpenSea-Auto-Uploader.git
pip install -r requirements.txt
KurtAtWork-OpenSea-Auto-Uploader-master
.assets/
folder of the repository.data/
folder and the name of each one must be a number.If you do not want to add details to the values not required, leave:
"file_path": "C:/Users/Admin/Desktop/NFT/nft_0001.png",
"nft_name": "NFT #1",
"description": "",
Required values *
(Mandatory value in certain specified cases)
Details | Data Types | Literal examples | JSON examples |
File Path * | String | "file_path": "C:/Users/Admin/Desktop/NFT/nft_0001.png", | |
NFT Name * | String | "nft_name": "NFT #1", | |
External Link | String | "external_link": "https://yournftwebsite.com/yournftcollection/000001",
"external_link": "", |
|
Description | String | "description": "This is my first NFT.",
"description": "", |
|
Collection | String | "collection": "My NFTs",
"collection": "", |
|
Properties | List[[String, String], ...]
List[String, String] |
["type", "name"]
[["type", "name"], ["type", "name"]] |
"properties": [{ "type": "Dog", "name": "Male" }, { "type": "Cat", "name": "Female" }],
"properties": [{ "type": "Dog", "name": "Male" }], "properties": "", |
Levels | List[[String, Integer, Integer], ...]
List[String, Integer, Integer] |
["name", value_from, value_to]
[["name", value_from, value_to], ["name", value_from, value_to]] |
"levels": [{ "name": "Speed", "from": 2, "to": 5 }, { "name": "Width", "from": 1, "to": 10 }],
"levels": [{ "name": "Speed", "from": 2, "to": 5 }], "levels": "", |
Stats | List[[String, Integer, Integer], ...]
List[String, Integer, Integer] |
["name", value_from, value_to]
[["name", value_from, value_to], ["name", value_from, value_to]] |
"stats": [{ "name": "Strenght", "from": 10, "to": 100 }, { "name": "Age", "from": 1, "to": 99 }],
"stats": [{ "name": "Strenght", "from": 10, "to": 100 }], "stats": "", |
Unlockable Content | List[Boolean, String]
List[Boolean] Boolean |
[True, "unlockable_content"]
[False] False |
"unlockable_content": [true, "Thank you for purchasing my NFT!"],
"unlockable_content": [false], "unlockable_content": false, "unlockable_content": "", |
Explicit And Sensitive Content | Boolean | "explicit_and_sensitive_content": true,
"explicit_and_sensitive_content": false, "explicit_and_sensitive_content": "", |
|
Supply | Integer | "supply": 1,
"supply" : "", |
|
Blockchain | String | "blockchain": "Polygon",
"blockchain" : "", |
|
Sale Type (only for Ethereum Blockchain and 1 supply) | String | "sale_type": "Timed Auction",
"sale_type": "", |
|
Price * | Float or Integer | "price": 5,
"price": 0.25, |
|
Method (only for "Timed Auction") | List[String, Float] | ["method", price]
["method, ""] |
"method": ["Sell with declining price", 0.002],
"method": ["Sell to highest bidder", 0.05], "method": ["Sell to highest bidder", ""], "method": "", |
Duration ("DD-MM-YYYY HH:MM") | List[String, String]
List[String] String |
["from_date", "to_date"]
["days/weeks/months"] "days/weeks/months" |
"duration": ["01-01-2022 14:00", "01-04-2022 15:00"],
"duration": ["1 week"], "duration": "1 week", "duration": "", |
Specific Buyer | List[Boolean, String]
[Boolean] Boolean |
[True, "wallet"]
[False] False |
"specific_buyer": [true, "0xDD135d5be0a23f6daAAE7D2d0580828c9e09402E"],
"specific_buyer": [false], "specific_buyer": false, "specific_buyer": "", |
Quantity * (only for 1+ supplies) | Integer | "quantity": 4
"quantity": "" |
And it gives you something like this: JSON.
When you want to sell your NFTs, Opensea requires various details according to their Blockchain or supply number.
Ethereum | Polygon | ||||||||||||||||||||
Supply number equal to 1 | Supply number higher than 1 | Supply number equal to 1 | Supply number higher than 1 | ||||||||||||||||||
Fixed Price | Timed Auction | ||||||||||||||||||||
Sell to highest bidder | Sell with declining price | ||||||||||||||||||||
Price (ETH) | Duration (from a date to an other date or 1 day, 3 days, 1 week, 6 months) | Reserve for a specific buyer | Price (ETH) | Duration (from a date to an other date or 1 day, 3 days, 1 week) | (Optional) Reserved Price (WETH) greater than 1 WETH and greater than Starting Price. | Reserve for a specific buyer | Starting Price (ETH) | Duration (from a date to an other date or 1 day, 3 days, 1 week) | Ending Price (ETH) less than theStarting Price. | Reserve for a specific buyer | Quantity | Price (ETH) | Duration (from a date to an other date or 1 day, 3 days, 1 week, 6 months) | Reserve for a specific buyer | Price (ETH) | Duration (from a date to an other date or 1 day, 3 days, 1 week, 6 months) | Reserve for a specific buyer | Quantity | Price (ETH) | Duration (from a date to an other date or 1 day, 3 days, 1 week, 6 months) | Reserve for a specific buyer |
// You can use this format for your path:
"file_path": "C:/Users/Admin/Desktop/MyNFTs/nft_0001.png",
// or this one:
"file_path": "C:\\Users\\Admin\\Desktop\\MyNFTs\\nft_0001.png",
// but not this one (you can see that "\" is highlighted in red):
"file_path": "C:\Users\Admin\Desktop\MyNFTs\nft_0001.png",
selenium.common.exceptions.WebDriverException:
Message: unknown error: failed to wait for extension background page to load:
chrome-extension://nkbihfbeogaeaoehlefnkodbefpgknn/background.html from timeout:
Timed out receiving message from renderer: 10.000
driver = webdriver.Chrome(service=Service( # DeprecationWarning using
TypeError: WebDriver.init() got an unexpected keyword argument 'service'
You must update your Selenium version to 4.1.0 or higher by typing in the command prompt:
pip install selenium --upgrade
You can now verify that a more recent version of Selenium is installed by typing:
pip show selenium