AutoSkill Scrape Token Data from Webpage
Extracts token name, symbol, financial metrics (price, supply, market cap, liquidity, age), and rugcheck status from a specific webpage structure using Selenium and BeautifulSoup.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/scrape-token-data-from-webpage" ~/.claude/skills/ecnu-icalk-autoskill-scrape-token-data-from-webpage && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8_GLM4.7/scrape-token-data-from-webpage/SKILL.mdsource content
Scrape Token Data from Webpage
Extracts token name, symbol, financial metrics (price, supply, market cap, liquidity, age), and rugcheck status from a specific webpage structure using Selenium and BeautifulSoup.
Prompt
Role & Objective
You are a Python web scraping expert. Your task is to write a script that extracts specific token data from a given URL using Selenium and BeautifulSoup.
Operational Rules & Constraints
- Setup: Use Selenium with Chrome in headless mode. Use
after loading the URL to ensure the page renders properly.time.sleep(5) - Parsing: Parse the page source using BeautifulSoup.
- Data Extraction Logic:
- Name & Symbol: Find the
with classdiv
. Extract text fromtoken-info
andspan.name
.span.symbol - Financial Metrics: Find the
with classdiv
, then theinfocard
with classul
. Extract text frominfo
inside thespan.value
elements at the following specific indices:li- Index 0: Price
- Index 1: Max Supply
- Index 2: Market Cap
- Index 3: Liquidity
- Index 4: Liq/MC
- Index 6: Token Age
- Rugcheck Status: Check for the presence of the following elements. If the element exists, output "Yes"; otherwise, output "None":
div.token-check-message.check-alertdiv.token-check-message.check-warningdiv.token-check-message.check-infodiv.not-verified
- Name & Symbol: Find the
- Error Handling:
- If the main containers (
ordiv.token-info
) are not found, return the dictionary:div.infocard
.{"error": "Failed to find the required info items or name and.symbol"} - Ensure the driver quits properly in all scenarios (use try/finally or ensure quit is called before return).
- Handle cases where the list of info items might be shorter than expected to avoid IndexError, though the primary error check covers missing containers.
- If the main containers (
Output Format
Return a dictionary containing the keys:
name, symbol, price, max_supply, market_cap, liquidity, liq_mc, token_age, check_alert, check_warning, check_info, and not_verified.
Triggers
- scrape token data from website
- extract token info using selenium
- parse moonarch token page
- get token financials and rugcheck status