[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7827FAANPSTZGNN7PSEVBGQ":3,"skill-same:01M7827FAANPSTZGNN7PSEVBGQ":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":38,"ownerHtmlUrl":39,"ownerBlogUrl":6,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M7827FAANPSTZGNN7PSEVBGQ","aibijia-price-comparison",null,"AI token price comparison platform that scrapes and aggregates prices across multiple platforms to help users find cheap, reliable AI account tokens","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fskills_sh\u002Fs\u002Fskills-sh_aradotso_trending-skills_aibijia-price-comparison\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: aibijia-price-comparison\ndescription: AI token price comparison platform that scrapes and aggregates prices across multiple platforms to help users find cheap, reliable AI account tokens\ntriggers:\n  - compare AI token prices\n  - find cheap ChatGPT plus\n  - scrape AI account prices\n  - build price comparison for AI tokens\n  - submit token vendor to aibijia\n  - aggregate AI CDK prices\n  - find reliable AI token resellers\n  - price scraping multiple platforms\n---\n\n# Aibijia Price Comparison Platform\n\n> Skill by [ara.so](https:\u002F\u002Fara.so) — Daily 2026 Skills collection.\n\nAibijia is a multi-platform price scraping and comparison website for AI tokens (ChatGPT Plus CDKs, API keys, etc.). It aggregates prices from various resellers\u002Fagents across platforms, helping users find the cheapest reliable source and avoid scams.\n\n**Live site:** https:\u002F\u002Faibijia.org  \n**Telegram:** https:\u002F\u002Ft.me\u002Fai_bi_jia_notice\n\n---\n\n## What This Project Does\n\n- **Scrapes** token\u002FCDK prices from multiple card-selling platforms (卡网)\n- **Compares** prices across vendors for the same type of AI account (e.g., ChatGPT Plus, GPT Pro)\n- **Aggregates** vendor reliability info via community submissions\n- **Exposes** price differences between resellers sourcing from the same upstream\n\n## Project Structure\n\nSince the repo is primarily a community\u002Fdata project with a web frontend, the core components are:\n\n```\nAIbijia\u002F\n├── assets\u002F           # Static assets (banner, images)\n├── data\u002F             # Price data \u002F scraped results (JSON\u002FCSV)\n├── scrapers\u002F         # Platform price scrapers\n├── frontend\u002F         # Website UI (aibijia.org)\n└── SKILL.md\n```\n\n---\n\n## Installation & Setup\n\n### Clone the Repository\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fka-pi-ba-la\u002FAIbijia.git\ncd AIbijia\n```\n\n### Install Dependencies\n\nIf Python-based scrapers:\n\n```bash\npip install -r requirements.txt\n```\n\nIf Node.js-based:\n\n```bash\nnpm install\n# or\npnpm install\n```\n\n---\n\n## Core Concepts\n\n### Token Types Tracked\n\n| Token Type | Example Price Range | Notes |\n|---|---|---|\n| ChatGPT Plus CDK | ¥30–¥60 | Same upstream, different markup |\n| GPT Pro (shared) | ~¥20\u002Fperson | Split among multiple users |\n| API Keys (各模型) | Varies | Per-token pricing |\n| Claude \u002F Gemini | Varies | Scraped from resellers |\n\n### Price Scraping Pattern\n\n```python\nimport requests\nfrom bs4 import BeautifulSoup\nimport json\nfrom datetime import datetime\n\nclass TokenPriceScraper:\n    \"\"\"\n    Base scraper for AI token price platforms.\n    Each platform subclasses this with custom parsing.\n    \"\"\"\n    \n    def __init__(self, platform_name: str, base_url: str):\n        self.platform_name = platform_name\n        self.base_url = base_url\n        self.session = requests.Session()\n        self.session.headers.update({\n            \"User-Agent\": \"Mozilla\u002F5.0 (compatible; Aibijia\u002F1.0)\"\n        })\n    \n    def fetch_page(self, url: str) -> BeautifulSoup:\n        resp = self.session.get(url, timeout=10)\n        resp.raise_for_status()\n        return BeautifulSoup(resp.text, \"html.parser\")\n    \n    def parse_prices(self, soup: BeautifulSoup) -> list[dict]:\n        \"\"\"Override in subclass to extract price data.\"\"\"\n        raise NotImplementedError\n    \n    def scrape(self) -> list[dict]:\n        soup = self.fetch_page(self.base_url)\n        prices = self.parse_prices(soup)\n        \n        # Annotate with metadata\n        for item in prices:\n            item[\"platform\"] = self.platform_name\n            item[\"scraped_at\"] = datetime.utcnow().isoformat()\n        \n        return prices\n\n\nclass KawangScraper(TokenPriceScraper):\n    \"\"\"Example scraper for a 卡网 (card platform).\"\"\"\n    \n    def parse_prices(self, soup: BeautifulSoup) -> list[dict]:\n        results = []\n        \n        # Adapt selectors to target platform's HTML structure\n        for card in soup.select(\".product-card\"):\n            name = card.select_one(\".product-name\")\n            price = card.select_one(\".product-price\")\n            stock = card.select_one(\".product-stock\")\n            \n            if name and price:\n                results.append({\n                    \"name\": name.get_text(strip=True),\n                    \"price_cny\": float(\n                        price.get_text(strip=True)\n                             .replace(\"¥\", \"\")\n                             .replace(\",\", \"\")\n                    ),\n                    \"in_stock\": stock and \"有货\" in stock.get_text(),\n                })\n        \n        return results\n```\n\n### Aggregating Prices Across Platforms\n\n```python\nimport asyncio\nimport aiohttp\nfrom dataclasses import dataclass\n\n@dataclass\nclass PriceListing:\n    token_type: str\n    platform: str\n    price_cny: float\n    in_stock: bool\n    url: str\n    scraped_at: str\n\nasync def aggregate_all_platforms(platforms: list[TokenPriceScraper]) -> list[PriceListing]:\n    \"\"\"\n    Run all scrapers concurrently and merge results.\n    \"\"\"\n    results = []\n    \n    async def run_scraper(scraper):\n        loop = asyncio.get_event_loop()\n        # Run sync scraper in thread pool\n        data = await loop.run_in_executor(None, scraper.scrape)\n        return data\n    \n    tasks = [run_scraper(p) for p in platforms]\n    all_data = await asyncio.gather(*tasks, return_exceptions=True)\n    \n    for platform_data in all_data:\n        if isinstance(platform_data, Exception):\n            print(f\"Scraper error: {platform_data}\")\n            continue\n        results.extend(platform_data)\n    \n    return results\n\n\ndef find_cheapest(listings: list[PriceListing], token_type: str) -> list[PriceListing]:\n    \"\"\"Filter and sort by price for a specific token type.\"\"\"\n    filtered = [\n        l for l in listings\n        if token_type.lower() in l.token_type.lower()\n        and l.in_stock\n    ]\n    return sorted(filtered, key=lambda x: x.price_cny)\n\n\n# Usage\nasync def main():\n    platforms = [\n        KawangScraper(\"platform_a\", \"https:\u002F\u002Fexample-card-site-a.com\u002Fchatgpt\"),\n        KawangScraper(\"platform_b\", \"https:\u002F\u002Fexample-card-site-b.com\u002Fchatgpt\"),\n    ]\n    \n    all_listings = await aggregate_all_platforms(platforms)\n    cheapest = find_cheapest(all_listings, \"ChatGPT Plus\")\n    \n    print(\"Cheapest ChatGPT Plus CDKs:\")\n    for listing in cheapest[:5]:\n        print(f\"  ¥{listing.price_cny} — {listing.platform}\")\n\nasyncio.run(main())\n```\n\n---\n\n## Vendor Submission API\n\nThe site exposes a submission endpoint for community-sourced vendors:\n\n```python\nimport requests\nimport os\n\nAIBIJIA_API = \"https:\u002F\u002Faibijia.org\u002Fapi\"  # hypothetical endpoint\n\ndef submit_vendor(vendor_info: dict) -> dict:\n    \"\"\"\n    Submit a new vendor\u002Fprice source for review.\n    \n    vendor_info keys:\n      - name: str          Vendor\u002Fplatform name\n      - url: str           Purchase URL\n      - token_type: str    e.g. \"ChatGPT Plus CDK\"\n      - price_cny: float   Current price in RMB\n      - notes: str         Optional reliability notes\n    \"\"\"\n    resp = requests.post(\n        f\"{AIBIJIA_API}\u002Fsubmit\",\n        json=vendor_info,\n        headers={\n            \"Content-Type\": \"application\u002Fjson\",\n            # Use env var if auth is required:\n            \"Authorization\": f\"Bearer {os.environ.get('AIBIJIA_API_KEY', '')}\",\n        },\n        timeout=10,\n    )\n    resp.raise_for_status()\n    return resp.json()\n\n\n# Example usage\nresult = submit_vendor({\n    \"name\": \"某卡网\",\n    \"url\": \"https:\u002F\u002Fexample-card-site.com\u002Fgpt-plus\",\n    \"token_type\": \"ChatGPT Plus CDK\",\n    \"price_cny\": 32.0,\n    \"notes\": \"24h售后，支持补货\",\n})\nprint(result)\n```\n\n---\n\n## Data Storage Pattern\n\n```python\nimport json\nimport os\nfrom pathlib import Path\nfrom datetime import datetime\n\nDATA_DIR = Path(\".\u002Fdata\")\n\ndef save_price_snapshot(listings: list[dict], token_type: str):\n    \"\"\"Save a timestamped price snapshot to data\u002F.\"\"\"\n    DATA_DIR.mkdir(exist_ok=True)\n    \n    date_str = datetime.utcnow().strftime(\"%Y-%m-%d\")\n    filename = DATA_DIR \u002F f\"{token_type.replace(' ', '_')}_{date_str}.json\"\n    \n    snapshot = {\n        \"token_type\": token_type,\n        \"captured_at\": datetime.utcnow().isoformat(),\n        \"count\": len(listings),\n        \"listings\": listings,\n    }\n    \n    with open(filename, \"w\", encoding=\"utf-8\") as f:\n        json.dump(snapshot, f, ensure_ascii=False, indent=2)\n    \n    print(f\"Saved {len(listings)} listings to {filename}\")\n\n\ndef load_latest_snapshot(token_type: str) -> dict | None:\n    \"\"\"Load the most recent snapshot for a token type.\"\"\"\n    pattern = f\"{token_type.replace(' ', '_')}_*.json\"\n    files = sorted(DATA_DIR.glob(pattern), reverse=True)\n    \n    if not files:\n        return None\n    \n    with open(files[0], encoding=\"utf-8\") as f:\n        return json.load(f)\n```\n\n---\n\n## Community Reporting (Avoid Scams)\n\nPost scam reports as GitHub Issues or submit to the repo:\n\n```markdown\n## 避雷报告模板\n\n**平台名称：** xxx卡网\n**购买时间：** 2026-04-28\n**商品：** ChatGPT Plus CDK\n**价格：** ¥35\n**问题：** CDK已失效，无法联系售后\n**证据：** [截图]\n**建议：** 避免购买\n```\n\n---\n\n## Configuration\n\n```python\n# config.py — Aibijia scraper configuration\n\nimport os\n\nCONFIG = {\n    # Scraping behavior\n    \"request_timeout\": int(os.environ.get(\"SCRAPE_TIMEOUT\", \"10\")),\n    \"rate_limit_seconds\": float(os.environ.get(\"SCRAPE_RATE_LIMIT\", \"2.0\")),\n    \"max_retries\": int(os.environ.get(\"SCRAPE_MAX_RETRIES\", \"3\")),\n    \n    # Proxy (optional, for bot detection avoidance)\n    \"proxy\": os.environ.get(\"HTTP_PROXY\", None),\n    \n    # Data output\n    \"data_dir\": os.environ.get(\"DATA_DIR\", \".\u002Fdata\"),\n    \n    # Notifications (Telegram)\n    \"telegram_bot_token\": os.environ.get(\"TELEGRAM_BOT_TOKEN\"),\n    \"telegram_channel_id\": os.environ.get(\"TELEGRAM_CHANNEL_ID\"),\n    \n    # Price alert threshold (alert if price drops below X CNY)\n    \"alert_price_threshold\": float(os.environ.get(\"ALERT_PRICE_CNY\", \"30.0\")),\n}\n```\n\n### Environment Variables\n\n```bash\n# .env (never commit this file)\nSCRAPE_TIMEOUT=15\nSCRAPE_RATE_LIMIT=3.0\nHTTP_PROXY=http:\u002F\u002Fproxy.example.com:8080\nDATA_DIR=.\u002Fdata\nTELEGRAM_BOT_TOKEN=your_bot_token_here\nTELEGRAM_CHANNEL_ID=@ai_bi_jia_notice\nALERT_PRICE_CNY=28.0\n```\n\n---\n\n## Telegram Price Alert Bot\n\n```python\nimport os\nimport asyncio\nfrom telegram import Bot\n\nasync def send_price_alert(listings: list[dict], threshold: float):\n    \"\"\"\n    Send Telegram alert when ChatGPT Plus CDK drops below threshold price.\n    \"\"\"\n    bot = Bot(token=os.environ[\"TELEGRAM_BOT_TOKEN\"])\n    channel = os.environ[\"TELEGRAM_CHANNEL_ID\"]\n    \n    cheap = [l for l in listings if l[\"price_cny\"] \u003C= threshold and l[\"in_stock\"]]\n    \n    if not cheap:\n        return\n    \n    lines = [f\"🔥 低价预警！ChatGPT Plus CDK ≤ ¥{threshold}\\n\"]\n    for l in cheap[:5]:\n        lines.append(f\"• ¥{l['price_cny']} — {l['platform']}\")\n    \n    await bot.send_message(\n        chat_id=channel,\n        text=\"\\n\".join(lines),\n        disable_web_page_preview=True,\n    )\n\nasyncio.run(send_price_alert(all_listings, threshold=30.0))\n```\n\n---\n\n## Common Patterns\n\n### Daily Cron Job (GitHub Actions)\n\n```yaml\n# .github\u002Fworkflows\u002Fscrape.yml\nname: Daily Price Scrape\n\non:\n  schedule:\n    - cron: \"0 2 * * *\"   # 2 AM UTC daily\n  workflow_dispatch:\n\njobs:\n  scrape:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-python@v5\n        with:\n          python-version: \"3.12\"\n      - run: pip install -r requirements.txt\n      - run: python scrapers\u002Frun_all.py\n        env:\n          TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}\n          TELEGRAM_CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }}\n      - uses: actions\u002Fupload-artifact@v4\n        with:\n          name: price-data\n          path: data\u002F\n```\n\n---\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| Scraper returns empty results | Target site changed HTML structure | Update CSS selectors in `parse_prices()` |\n| 403 \u002F blocked requests | Bot detection on target platform | Add proxy via `HTTP_PROXY` env var or rotate User-Agent |\n| Prices stale | Cron not running | Check GitHub Actions logs; run `python scrapers\u002Frun_all.py` manually |\n| Telegram alerts not sending | Wrong token\u002Fchannel | Verify `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHANNEL_ID` env vars |\n| CDK already used \u002F invalid | Upstream fraud | Report in repo issues with evidence; avoid that vendor |\n\n### Anti-Bot Countermeasures\n\n```python\nimport time\nimport random\n\ndef polite_get(session, url: str, min_delay=1.5, max_delay=4.0) -> str:\n    \"\"\"Add random delay between requests to avoid rate limiting.\"\"\"\n    time.sleep(random.uniform(min_delay, max_delay))\n    resp = session.get(url, timeout=10)\n    resp.raise_for_status()\n    return resp.text\n```\n\n---\n\n## Contributing Price Sources\n\n1. Fork the repo\n2. Add your vendor\u002Fsource to `data\u002Fsources.json`\n3. Open a PR with evidence of reliability (screenshots, purchase history)\n4. Community reviews and merges\n\n```json\n\u002F\u002F data\u002Fsources.json entry format\n{\n  \"id\": \"vendor_slug\",\n  \"name\": \"平台名称\",\n  \"url\": \"https:\u002F\u002Fexample-card-site.com\",\n  \"token_types\": [\"ChatGPT Plus CDK\", \"Claude API\"],\n  \"verified\": false,\n  \"submitted_by\": \"github_username\",\n  \"notes\": \"24h售后，微信群支持\"\n}\n```\n","# Aibijia Price Comparison Platform\n\n> Skill by [ara.so](https:\u002F\u002Fara.so) — Daily 2026 Skills collection.\n\nAibijia is a multi-platform price scraping and comparison website for AI tokens (ChatGPT Plus CDKs, API keys, etc.). It aggregates prices from various resellers\u002Fagents across platforms, helping users find the cheapest reliable source and avoid scams.\n\n**Live site:** https:\u002F\u002Faibijia.org  \n**Telegram:** https:\u002F\u002Ft.me\u002Fai_bi_jia_notice\n\n---\n\n## What This Project Does\n\n- **Scrapes** token\u002FCDK prices from multiple card-selling platforms (卡网)\n- **Compares** prices across vendors for the same type of AI account (e.g., ChatGPT Plus, GPT Pro)\n- **Aggregates** vendor reliability info via community submissions\n- **Exposes** price differences between resellers sourcing from the same upstream\n\n## Project Structure\n\nSince the repo is primarily a community\u002Fdata project with a web frontend, the core components are:\n\n```\nAIbijia\u002F\n├── assets\u002F           # Static assets (banner, images)\n├── data\u002F             # Price data \u002F scraped results (JSON\u002FCSV)\n├── scrapers\u002F         # Platform price scrapers\n├── frontend\u002F         # Website UI (aibijia.org)\n└── SKILL.md\n```\n\n---\n\n## Installation & Setup\n\n### Clone the Repository\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fka-pi-ba-la\u002FAIbijia.git\ncd AIbijia\n```\n\n### Install Dependencies\n\nIf Python-based scrapers:\n\n```bash\npip install -r requirements.txt\n```\n\nIf Node.js-based:\n\n```bash\nnpm install\n# or\npnpm install\n```\n\n---\n\n## Core Concepts\n\n### Token Types Tracked\n\n| Token Type | Example Price Range | Notes |\n|---|---|---|\n| ChatGPT Plus CDK | ¥30–¥60 | Same upstream, different markup |\n| GPT Pro (shared) | ~¥20\u002Fperson | Split among multiple users |\n| API Keys (各模型) | Varies | Per-token pricing |\n| Claude \u002F Gemini | Varies | Scraped from resellers |\n\n### Price Scraping Pattern\n\n```python\nimport requests\nfrom bs4 import BeautifulSoup\nimport json\nfrom datetime import datetime\n\nclass TokenPriceScraper:\n    \"\"\"\n    Base scraper for AI token price platforms.\n    Each platform subclasses this with custom parsing.\n    \"\"\"\n    \n    def __init__(self, platform_name: str, base_url: str):\n        self.platform_name = platform_name\n        self.base_url = base_url\n        self.session = requests.Session()\n        self.session.headers.update({\n            \"User-Agent\": \"Mozilla\u002F5.0 (compatible; Aibijia\u002F1.0)\"\n        })\n    \n    def fetch_page(self, url: str) -> BeautifulSoup:\n        resp = self.session.get(url, timeout=10)\n        resp.raise_for_status()\n        return BeautifulSoup(resp.text, \"html.parser\")\n    \n    def parse_prices(self, soup: BeautifulSoup) -> list[dict]:\n        \"\"\"Override in subclass to extract price data.\"\"\"\n        raise NotImplementedError\n    \n    def scrape(self) -> list[dict]:\n        soup = self.fetch_page(self.base_url)\n        prices = self.parse_prices(soup)\n        \n        # Annotate with metadata\n        for item in prices:\n            item[\"platform\"] = self.platform_name\n            item[\"scraped_at\"] = datetime.utcnow().isoformat()\n        \n        return prices\n\n\nclass KawangScraper(TokenPriceScraper):\n    \"\"\"Example scraper for a 卡网 (card platform).\"\"\"\n    \n    def parse_prices(self, soup: BeautifulSoup) -> list[dict]:\n        results = []\n        \n        # Adapt selectors to target platform's HTML structure\n        for card in soup.select(\".product-card\"):\n            name = card.select_one(\".product-name\")\n            price = card.select_one(\".product-price\")\n            stock = card.select_one(\".product-stock\")\n            \n            if name and price:\n                results.append({\n                    \"name\": name.get_text(strip=True),\n                    \"price_cny\": float(\n                        price.get_text(strip=True)\n                             .replace(\"¥\", \"\")\n                             .replace(\",\", \"\")\n                    ),\n                    \"in_stock\": stock and \"有货\" in stock.get_text(),\n                })\n        \n        return results\n```\n\n### Aggregating Prices Across Platforms\n\n```python\nimport asyncio\nimport aiohttp\nfrom dataclasses import dataclass\n\n@dataclass\nclass PriceListing:\n    token_type: str\n    platform: str\n    price_cny: float\n    in_stock: bool\n    url: str\n    scraped_at: str\n\nasync def aggregate_all_platforms(platforms: list[TokenPriceScraper]) -> list[PriceListing]:\n    \"\"\"\n    Run all scrapers concurrently and merge results.\n    \"\"\"\n    results = []\n    \n    async def run_scraper(scraper):\n        loop = asyncio.get_event_loop()\n        # Run sync scraper in thread pool\n        data = await loop.run_in_executor(None, scraper.scrape)\n        return data\n    \n    tasks = [run_scraper(p) for p in platforms]\n    all_data = await asyncio.gather(*tasks, return_exceptions=True)\n    \n    for platform_data in all_data:\n        if isinstance(platform_data, Exception):\n            print(f\"Scraper error: {platform_data}\")\n            continue\n        results.extend(platform_data)\n    \n    return results\n\n\ndef find_cheapest(listings: list[PriceListing], token_type: str) -> list[PriceListing]:\n    \"\"\"Filter and sort by price for a specific token type.\"\"\"\n    filtered = [\n        l for l in listings\n        if token_type.lower() in l.token_type.lower()\n        and l.in_stock\n    ]\n    return sorted(filtered, key=lambda x: x.price_cny)\n\n\n# Usage\nasync def main():\n    platforms = [\n        KawangScraper(\"platform_a\", \"https:\u002F\u002Fexample-card-site-a.com\u002Fchatgpt\"),\n        KawangScraper(\"platform_b\", \"https:\u002F\u002Fexample-card-site-b.com\u002Fchatgpt\"),\n    ]\n    \n    all_listings = await aggregate_all_platforms(platforms)\n    cheapest = find_cheapest(all_listings, \"ChatGPT Plus\")\n    \n    print(\"Cheapest ChatGPT Plus CDKs:\")\n    for listing in cheapest[:5]:\n        print(f\"  ¥{listing.price_cny} — {listing.platform}\")\n\nasyncio.run(main())\n```\n\n---\n\n## Vendor Submission API\n\nThe site exposes a submission endpoint for community-sourced vendors:\n\n```python\nimport requests\nimport os\n\nAIBIJIA_API = \"https:\u002F\u002Faibijia.org\u002Fapi\"  # hypothetical endpoint\n\ndef submit_vendor(vendor_info: dict) -> dict:\n    \"\"\"\n    Submit a new vendor\u002Fprice source for review.\n    \n    vendor_info keys:\n      - name: str          Vendor\u002Fplatform name\n      - url: str           Purchase URL\n      - token_type: str    e.g. \"ChatGPT Plus CDK\"\n      - price_cny: float   Current price in RMB\n      - notes: str         Optional reliability notes\n    \"\"\"\n    resp = requests.post(\n        f\"{AIBIJIA_API}\u002Fsubmit\",\n        json=vendor_info,\n        headers={\n            \"Content-Type\": \"application\u002Fjson\",\n            # Use env var if auth is required:\n            \"Authorization\": f\"Bearer {os.environ.get('AIBIJIA_API_KEY', '')}\",\n        },\n        timeout=10,\n    )\n    resp.raise_for_status()\n    return resp.json()\n\n\n# Example usage\nresult = submit_vendor({\n    \"name\": \"某卡网\",\n    \"url\": \"https:\u002F\u002Fexample-card-site.com\u002Fgpt-plus\",\n    \"token_type\": \"ChatGPT Plus CDK\",\n    \"price_cny\": 32.0,\n    \"notes\": \"24h售后，支持补货\",\n})\nprint(result)\n```\n\n---\n\n## Data Storage Pattern\n\n```python\nimport json\nimport os\nfrom pathlib import Path\nfrom datetime import datetime\n\nDATA_DIR = Path(\".\u002Fdata\")\n\ndef save_price_snapshot(listings: list[dict], token_type: str):\n    \"\"\"Save a timestamped price snapshot to data\u002F.\"\"\"\n    DATA_DIR.mkdir(exist_ok=True)\n    \n    date_str = datetime.utcnow().strftime(\"%Y-%m-%d\")\n    filename = DATA_DIR \u002F f\"{token_type.replace(' ', '_')}_{date_str}.json\"\n    \n    snapshot = {\n        \"token_type\": token_type,\n        \"captured_at\": datetime.utcnow().isoformat(),\n        \"count\": len(listings),\n        \"listings\": listings,\n    }\n    \n    with open(filename, \"w\", encoding=\"utf-8\") as f:\n        json.dump(snapshot, f, ensure_ascii=False, indent=2)\n    \n    print(f\"Saved {len(listings)} listings to {filename}\")\n\n\ndef load_latest_snapshot(token_type: str) -> dict | None:\n    \"\"\"Load the most recent snapshot for a token type.\"\"\"\n    pattern = f\"{token_type.replace(' ', '_')}_*.json\"\n    files = sorted(DATA_DIR.glob(pattern), reverse=True)\n    \n    if not files:\n        return None\n    \n    with open(files[0], encoding=\"utf-8\") as f:\n        return json.load(f)\n```\n\n---\n\n## Community Reporting (Avoid Scams)\n\nPost scam reports as GitHub Issues or submit to the repo:\n\n```markdown\n## 避雷报告模板\n\n**平台名称：** xxx卡网\n**购买时间：** 2026-04-28\n**商品：** ChatGPT Plus CDK\n**价格：** ¥35\n**问题：** CDK已失效，无法联系售后\n**证据：** [截图]\n**建议：** 避免购买\n```\n\n---\n\n## Configuration\n\n```python\n# config.py — Aibijia scraper configuration\n\nimport os\n\nCONFIG = {\n    # Scraping behavior\n    \"request_timeout\": int(os.environ.get(\"SCRAPE_TIMEOUT\", \"10\")),\n    \"rate_limit_seconds\": float(os.environ.get(\"SCRAPE_RATE_LIMIT\", \"2.0\")),\n    \"max_retries\": int(os.environ.get(\"SCRAPE_MAX_RETRIES\", \"3\")),\n    \n    # Proxy (optional, for bot detection avoidance)\n    \"proxy\": os.environ.get(\"HTTP_PROXY\", None),\n    \n    # Data output\n    \"data_dir\": os.environ.get(\"DATA_DIR\", \".\u002Fdata\"),\n    \n    # Notifications (Telegram)\n    \"telegram_bot_token\": os.environ.get(\"TELEGRAM_BOT_TOKEN\"),\n    \"telegram_channel_id\": os.environ.get(\"TELEGRAM_CHANNEL_ID\"),\n    \n    # Price alert threshold (alert if price drops below X CNY)\n    \"alert_price_threshold\": float(os.environ.get(\"ALERT_PRICE_CNY\", \"30.0\")),\n}\n```\n\n### Environment Variables\n\n```bash\n# .env (never commit this file)\nSCRAPE_TIMEOUT=15\nSCRAPE_RATE_LIMIT=3.0\nHTTP_PROXY=http:\u002F\u002Fproxy.example.com:8080\nDATA_DIR=.\u002Fdata\nTELEGRAM_BOT_TOKEN=your_bot_token_here\nTELEGRAM_CHANNEL_ID=@ai_bi_jia_notice\nALERT_PRICE_CNY=28.0\n```\n\n---\n\n## Telegram Price Alert Bot\n\n```python\nimport os\nimport asyncio\nfrom telegram import Bot\n\nasync def send_price_alert(listings: list[dict], threshold: float):\n    \"\"\"\n    Send Telegram alert when ChatGPT Plus CDK drops below threshold price.\n    \"\"\"\n    bot = Bot(token=os.environ[\"TELEGRAM_BOT_TOKEN\"])\n    channel = os.environ[\"TELEGRAM_CHANNEL_ID\"]\n    \n    cheap = [l for l in listings if l[\"price_cny\"] \u003C= threshold and l[\"in_stock\"]]\n    \n    if not cheap:\n        return\n    \n    lines = [f\"🔥 低价预警！ChatGPT Plus CDK ≤ ¥{threshold}\\n\"]\n    for l in cheap[:5]:\n        lines.append(f\"• ¥{l['price_cny']} — {l['platform']}\")\n    \n    await bot.send_message(\n        chat_id=channel,\n        text=\"\\n\".join(lines),\n        disable_web_page_preview=True,\n    )\n\nasyncio.run(send_price_alert(all_listings, threshold=30.0))\n```\n\n---\n\n## Common Patterns\n\n### Daily Cron Job (GitHub Actions)\n\n```yaml\n# .github\u002Fworkflows\u002Fscrape.yml\nname: Daily Price Scrape\n\non:\n  schedule:\n    - cron: \"0 2 * * *\"   # 2 AM UTC daily\n  workflow_dispatch:\n\njobs:\n  scrape:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-python@v5\n        with:\n          python-version: \"3.12\"\n      - run: pip install -r requirements.txt\n      - run: python scrapers\u002Frun_all.py\n        env:\n          TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}\n          TELEGRAM_CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }}\n      - uses: actions\u002Fupload-artifact@v4\n        with:\n          name: price-data\n          path: data\u002F\n```\n\n---\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| Scraper returns empty results | Target site changed HTML structure | Update CSS selectors in `parse_prices()` |\n| 403 \u002F blocked requests | Bot detection on target platform | Add proxy via `HTTP_PROXY` env var or rotate User-Agent |\n| Prices stale | Cron not running | Check GitHub Actions logs; run `python scrapers\u002Frun_all.py` manually |\n| Telegram alerts not sending | Wrong token\u002Fchannel | Verify `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHANNEL_ID` env vars |\n| CDK already used \u002F invalid | Upstream fraud | Report in repo issues with evidence; avoid that vendor |\n\n### Anti-Bot Countermeasures\n\n```python\nimport time\nimport random\n\ndef polite_get(session, url: str, min_delay=1.5, max_delay=4.0) -> str:\n    \"\"\"Add random delay between requests to avoid rate limiting.\"\"\"\n    time.sleep(random.uniform(min_delay, max_delay))\n    resp = session.get(url, timeout=10)\n    resp.raise_for_status()\n    return resp.text\n```\n\n---\n\n## Contributing Price Sources\n\n1. Fork the repo\n2. Add your vendor\u002Fsource to `data\u002Fsources.json`\n3. Open a PR with evidence of reliability (screenshots, purchase history)\n4. Community reviews and merges\n\n```json\n\u002F\u002F data\u002Fsources.json entry format\n{\n  \"id\": \"vendor_slug\",\n  \"name\": \"平台名称\",\n  \"url\": \"https:\u002F\u002Fexample-card-site.com\",\n  \"token_types\": [\"ChatGPT Plus CDK\", \"Claude API\"],\n  \"verified\": false,\n  \"submitted_by\": \"github_username\",\n  \"notes\": \"24h售后，微信群支持\"\n}\n```\n",{"name":5,"triggers":24,"description":7},[25,26,27,28,29,30,31,32],"compare AI token prices","find cheap ChatGPT plus","scrape AI account prices","build price comparison for AI tokens","submit token vendor to aibijia","aggregate AI CDK prices","find reliable AI token resellers","price scraping multiple platforms","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fskills_sh\u002Fs\u002Fskills-sh_aradotso_trending-skills_aibijia-price-comparison",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill aibijia-price-comparison",{"tool":48,"command":49},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill aibijia-price-comparison",{"tool":51,"command":52},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill aibijia-price-comparison","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fskills_sh\u002Fs\u002Fskills-sh_aradotso_trending-skills_aibijia-price-comparison\u002FSKILL.md",true,[],[57,64,71,78,85,92],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]