Binance Square Scraper logo

Binance Square Scraper

Community
itgoyo
binance-square-scraper

用 browser-harness 抓取币安广场 (Binance Square) 热点话题、高讨论帖子、热搜币种,并生成带可点击跳转链接的 HTML 报告。

Overview

Publisheritgoyo
Repositoryhermes-skills
Skill namebinance-square-scraper
Stars
77
Forks
11
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by itgoyo on GitHub. Read the source before you install it.

Installation

Install the Binance Square Scraper AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/itgoyo/hermes-skills/tree/main/browser-harness/binance-square-scraper
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/itgoyo/hermes-skills.git /tmp/hermes-skills
mkdir -p .claude/skills
cp -r /tmp/hermes-skills/browser-harness/binance-square-scraper .claude/skills/binance-square-scraper
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Binance Square Scraper in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Binance Square Scraper on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Binance Square Scraper is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Binance Square 热点抓取

触发条件

用户要求抓取币安广场热点、热门帖子、讨论度排名等。

关键发现(字段测试得出)

  • Binance Square 是 React SPA,js() helper 直接返回 None,必须用 cdp("Runtime.evaluate", expression="...", returnByValue=True) 提取 DOM 数据。
  • wait_for_load() 会无限挂起,改用 goto(url) + time.sleep(8) 等待渲染。
  • 用 new_tab(url) 后需再次调用 time.sleep(8),不能依赖 load 事件。

URL 结构

帖子原文:  https://www.binance.com/zh-CN/square/post/{postId}
话题页:    https://www.binance.com/zh-CN/square/hashtag/{encodedTopic}
用户主页:  https://www.binance.com/zh-CN/square/profile/{handle}
恐惧贪婪:  https://www.binance.com/zh-CN/square/fear-and-greed-index
热门话题:  https://www.binance.com/zh-CN/square/trends
交易对:    https://www.binance.com/zh-CN/trade/{COIN}_USDT
合约:      https://www.binance.com/zh-CN/futures/{COIN}USDT

抓取步骤

python
# Step 1: 导航并等待渲染
new_tab("https://www.binance.com/zh-CN/square")
time.sleep(8)

# Step 2: 用 cdp Runtime.evaluate 提取文本
text = cdp("Runtime.evaluate",
    expression="document.body.innerText.substring(0, 5000)",
    returnByValue=True)
content = text['result']['value']

# Step 3: 提取所有链接(含帖子/话题/交易对)
links_raw = cdp("Runtime.evaluate", expression="""
(function() {
    const links = [];
    document.querySelectorAll('a').forEach(a => {
        if (a.href && a.href.length > 10) {
            links.push({href: a.href, text: (a.innerText || '').trim().substring(0, 80)});
        }
    });
    return JSON.stringify(links.slice(0, 60));
})()
""", returnByValue=True)
links = json.loads(links_raw['result']['value'])

# Step 4: 滚动获取更多帖子
cdp("Runtime.evaluate", expression="window.scrollBy(0, 2000)", returnByValue=True)
time.sleep(3)
# 再次抓取链接...

数据分类

从 innerText 中可提取:

  • 热门话题:带 次浏览 和 人讨论中 的段落
  • 帖子正文:作者名 + 时间 + 内容 + 互动数
  • 热搜币种:热度上升 标记 + 价格 + 涨跌幅
  • 恐惧贪婪指数:数字 + 状态词(中性/恐惧/贪婪)

从链接列表中可提取:

  • /square/post/{id} → 帖子原文 URL
  • /square/hashtag/{encoded} → 话题页 URL
  • /trade/{COIN}_USDT → 交易页 URL

输出要求(用户偏好)

输出 HTML 报告,保存到 ~/Documents/Hermes/,要求:

  • 所有内容必须可点击跳转:帖子 → 原帖、话题 → 话题页、币种 → 交易页
  • 卡片悬停有金色边框 + 位移动画(符合币安风格 #f0b90b)
  • 暗色主题(背景 #0b0e11)
  • 帖子卡片包含:作者、时间、正文摘要(4行截断)、涨跌标签、"查看原帖 →" 按钮
  • 话题卡片包含:排名徽章、浏览量、讨论人数
  • 底部注明数据来源和免责声明

坑

  • js() helper 对 Binance Square 无效,永远返回 None。必须走 cdp() 路径。
  • 话题链接中中文会被 URL encode,要用 encodeURIComponent 或直接从链接列表里取。
  • 页面初次加载只显示 ~4 条帖子,需滚动后才能加载更多。
  • macOS 系统 SOCKS 代理(YOUR_PROXY_HOST:PORT)会导致 browser-harness daemon 连接 ws://localhost:9222 报错:connecting through a SOCKS proxy requires python-socks。修复:在 harness 的 uv venv 中安装 python-socks。
  • Chrome 必须用 --headless=new + /tmp 临时目录启动:直接用真实 user-data-dir 会报 "requires non-default data directory"。
  • Chrome 每次重启后 WS URL 中的 browser UUID 会变,必须重新获取并重新设置 BU_CDP_WS 环境变量。
  • /tmp/chromedebug 路径不在 browser-harness PROFILES 自动发现列表中,必须手动设置 BU_CDP_WS 环境变量或写入 DevToolsActivePort 文件。
  • 最简启动方式:nohup chrome --headless=new --remote-debugging-port=9222 --user-data-dir=/tmp/chromedebug ... & → sleep 5 → WS=$(curl json/version | parse wsUrl) → BU_CDP_WS="$WS" browser-harness < script.py

Frequently asked questions

What does the Binance Square Scraper AI skill do?

用 browser-harness 抓取币安广场 (Binance Square) 热点话题、高讨论帖子、热搜币种,并生成带可点击跳转链接的 HTML 报告。

Why use Binance Square Scraper on TypingMind?

Because you install it once and use it with any model. Binance Square Scraper is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Binance Square Scraper in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/itgoyo/hermes-skills/tree/main/browser-harness/binance-square-scraper. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Binance Square Scraper?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Binance Square Scraper?

As many as you like. As long as a model supports skills, you can use Binance Square Scraper with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Binance Square Scraper AI skill free?

It is published on GitHub by itgoyo. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇