Receber por email
← Voltar para o catálogo

taoguba-crawler

Esta skill é utilizada para rastrear páginas web, artigos ou a página inicial do Taoguba (tgb.cn) e gerar HTML de artigos, ativando-se quando o usuário solicita a execução dos crawlers do Taoguba.

10estrelas
Atualizado há 7 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add lisniuse/taoguba-crawler-skill

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/taoguba-crawler/svg)](https://www.skillteca.com.br/skills/taoguba-crawler)
#ai

Skills relacionadas

Ver todas de Pesquisa e Web →

Alerta por categoria

Receba novas skills de Pesquisa e Web toda segunda

1 email curto, só com as skills novas de Pesquisa e Web. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Taoguba Crawler

This skill runs the Taoguba (tgb.cn) article crawlers located in the project root.

Prerequisites

  • Python 3 with requests, beautifulsoup4, python-dotenv installed
  • A .env file in the project root containing COOKIE and optionally USER_AGENT

Available Crawlers

1. BBS Crawler (crawler_bbs.py)

Crawl the forum board at tgb.cn/bbs/1/1 using HTML scraping.

python crawler_bbs.py
  • Extracts article list by parsing a.overhide.mw300 elements
  • Gets each article's main post and author replies
  • Downloads images and embeds them as base64 in HTML
  • Outputs: output/bbs_YYYY-MM-DD.json and output/bbs_YYYY-MM-DD_HHMMSS.html

2. Home Crawler (crawler_home.py)

Crawl the homepage recommendations via JSON API (/newIndex/getZh).

python crawler_home.py
  • Fetches articles from the JSON API (default 2 pages)
  • Same content extraction and HTML generation as BBS crawler
  • Outputs: output/home_YYYY-MM-DD.json and output/home_YYYY-MM-DD_HHMMSS.html

Common Workflow

To run both crawlers:

python crawler_bbs.py && python crawler_home.py

Key Implementation Details

  • Authentication: Both scripts read COOKIE from .env via python-dotenv
  • Rate limiting: 0.5-1s delay between requests to avoid being blocked
  • Image handling: Images are downloaded and embedded as base64 in the HTML output
  • Article content: Extracts main post (#first) and author replies (.comment-data with author badge)
  • Output directory: All results saved to output/ folder

Scripts

The crawler scripts are bundled in scripts/:

  • scripts/crawler_bbs.py - BBS forum crawler (HTML scraping)
  • scripts/crawler_home.py - Homepage crawler (JSON API)

To run the bundled scripts directly:

python scripts/crawler_bbs.py
python scripts/crawler_home.py

Troubleshooting

  • If no articles are returned, check that .env contains a valid COOKIE value
  • If image downloads fail, the HTML will show error messages inline
  • Network timeouts default to 10-15 seconds per request
Compartilhar X LinkedIn