This Flask application compares token assets between two wallet addresses based on a predefined list of assets stored in Dank_Assets.txt. The application fetches wallet balances using an external API and identifies unique assets found in the second wallet but not in the first.
Additionally, a web scraper is included to keep the Dank_Assets.txt file updated with the latest assets from https://pepe.wtf/assets/dank-rares.
- Loads a list of assets from
Dank_Assets.txt. - Fetches wallet assets from an external API (
tokenscan.io). - Compares two wallet addresses and highlights unique assets in the second wallet.
- Displays results in a simple web interface.
- Scrapes the latest Dank assets and updates
Dank_Assets.txtautomatically.
Ensure you have Python installed and install the necessary dependencies:
pip install flask requests selenium webdriver-manager beautifulsoup4app.py: The main Flask application file.scraper.py: A script that scrapes Dank assets and updatesDank_Assets.txt.Dank_Assets.txt: A text file containing asset names to track.templates/index.html: HTML template for user input and results display.
- Ensure
Dank_Assets.txtexists and contains asset names (one per line). - Run the Flask application:
python app.py- Open your browser and go to
http://127.0.0.1:5000/. - Enter two wallet addresses and submit to compare assets.
Run the scraping script to update Dank_Assets.txt:
python scraper.pyThis will scrape the latest assets from https://pepe.wtf/assets/dank-rares and update the file.
The app fetches assets from:
https://tokenscan.io/api/balances/{wallet_address}?page={page}&limit={limit}
Make sure the API is functional before running the application.
- If
Dank_Assets.txtis missing, the app will assume an empty asset list. - If the API request fails, it returns an empty asset list instead of crashing.
- The scraper runs in headless mode to automate asset updates efficiently.
This project is open-source and available for modification and distribution.