Files
antigravity-skills-reference/skills/junta-leiloeiros/scripts/scraper/jucesc.py
ProgramadorBrasil 61ec71c5c7 feat: add 52 specialized AI agent skills (#217)
New skills covering 10 categories:

**Security & Audit**: 007 (STRIDE/PASTA/OWASP), cred-omega (secrets management)
**AI Personas**: Karpathy, Hinton, Sutskever, LeCun (4 sub-skills), Altman, Musk, Gates, Jobs, Buffett
**Multi-agent Orchestration**: agent-orchestrator, task-intelligence, multi-advisor
**Code Analysis**: matematico-tao (Terence Tao-inspired mathematical code analysis)
**Social & Messaging**: Instagram Graph API, Telegram Bot, WhatsApp Cloud API, social-orchestrator
**Image Generation**: AI Studio (Gemini), Stability AI, ComfyUI Gateway, image-studio router
**Brazilian Domain**: 6 auction specialist modules, 2 legal advisors, auctioneers data scraper
**Product & Growth**: design, invention, monetization, analytics, growth engine
**DevOps & LLM Ops**: Docker/CI-CD/AWS, RAG/embeddings/fine-tuning
**Skill Governance**: installer, sentinel auditor, context management

Each skill includes:
- Standardized YAML frontmatter (name, description, risk, source, tags, tools)
- Structured sections (Overview, When to Use, How it Works, Best Practices)
- Python scripts and reference documentation where applicable
- Cross-platform compatibility (Claude Code, Antigravity, Cursor, Gemini CLI, Codex CLI)

Co-authored-by: ProgramadorBrasil <214873561+ProgramadorBrasil@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:04:07 +01:00

90 lines
3.5 KiB
Python

"""
Scraper JUCESC — Junta Comercial do Estado de Santa Catarina
URL: https://leiloeiros.jucesc.sc.gov.br/site/
https://leiloeiros.jucesc.sc.gov.br/site/porcidade.php (por cidade)
Método: httpx + BeautifulSoup (sistema dedicado com tabela HTML)
Nota: Sistema migrou para subdomínio dedicado leiloeiros.jucesc.sc.gov.br
"""
from __future__ import annotations
from typing import List
from .base_scraper import AbstractJuntaScraper, Leiloeiro
class JucescScraper(AbstractJuntaScraper):
estado = "SC"
junta = "JUCESC"
url = "https://leiloeiros.jucesc.sc.gov.br/site/"
async def parse_leiloeiros(self) -> List[Leiloeiro]:
soup = await self.fetch_page()
if not soup:
soup = await self.fetch_page_js(wait_ms=3000)
if not soup:
return []
results: List[Leiloeiro] = []
for table in soup.find_all("table"):
rows = table.find_all("tr")
if len(rows) < 2:
continue
headers = [self.clean(th.get_text()) for th in rows[0].find_all(["th", "td"])]
if not headers:
continue
col = {(h or "").lower(): i for i, h in enumerate(headers)}
def gcol(cells, frags):
for k, i in col.items():
if any(f in k for f in frags) and i < len(cells):
return self.clean(cells[i].get_text())
return None
for row in rows[1:]:
cells = row.find_all(["td", "th"])
if not cells:
continue
nome = gcol(cells, ["nome", "leiloeiro"]) or self.clean(cells[0].get_text())
if not nome or len(nome) < 3:
continue
results.append(self.make_leiloeiro(
nome=nome,
matricula=gcol(cells, ["matr", "registro", "", "numero", "antiguidade"]),
cpf_cnpj=gcol(cells, ["cpf", "cnpj"]),
situacao=gcol(cells, ["situ", "status"]),
municipio=gcol(cells, ["munic", "cidade"]) or "Florianópolis",
telefone=gcol(cells, ["tel", "fone"]),
email=gcol(cells, ["email"]),
endereco=gcol(cells, ["ender", "logr", "rua"]),
data_registro=gcol(cells, ["data", "posse", "registro"]),
))
if results:
break
# Se não achou tabela, tenta página por cidade para pegar todos
if not results:
soup2 = await self.fetch_page(url="https://leiloeiros.jucesc.sc.gov.br/site/porcidade.php")
if soup2:
for table in soup2.find_all("table"):
rows = table.find_all("tr")
if len(rows) < 2:
continue
for row in rows[1:]:
cells = row.find_all(["td", "th"])
if not cells:
continue
nome = self.clean(cells[0].get_text())
if not nome or len(nome) < 3:
continue
results.append(self.make_leiloeiro(
nome=nome,
matricula=self.clean(cells[1].get_text()) if len(cells) > 1 else None,
municipio=self.clean(cells[2].get_text()) if len(cells) > 2 else "Florianópolis",
))
if results:
break
return results