tw93/Waza / plugins/waza/skills/read
read
VerifiedFetches URLs and PDFs, then summarizes or returns clean Markdown; can also search the web through DeepSeek when built-in search is thin. Use when asked to read, fetch, quote, cite, convert, or save a URL or PDF. Not for local text files already in the repo.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.7 KB |
| references/read-methods.md | markdown | 5.2 KB |
| scripts/deepseek.py | script | 3.9 KB |
| scripts/fetch.sh | script | 3.9 KB |
| scripts/fetch_feishu.py | script | 8.9 KB |
| scripts/fetch_local.py | script | 7.1 KB |
| scripts/fetch_weixin.py | script | 3.6 KB |
scripts/fetch_weixin.py
View on GitHub#!/usr/bin/env python3
"""Fetch WeChat public account article as Markdown using Playwright + BeautifulSoup.
Special thanks to joeseesun for the excellent qiaomu-markdown-proxy project,
which inspired the Playwright-based WeChat scraping approach in this script.
https://github.com/joeseesun/qiaomu-markdown-proxy
Requirements:
pip install playwright beautifulsoup4 lxml
playwright install chromium
Usage:
python3 fetch_weixin.py <url>
python3 fetch_weixin.py <url> --json
"""
import sys
import json
import asyncio
def yaml_string(value: str) -> str:
return json.dumps("" if value is None else str(value), ensure_ascii=False)
async def fetch(url: str) -> dict:
try:
from playwright.async_api import async_playwright
from bs4 import BeautifulSoup
except ImportError as e:
return {"error": str(e) + "\nRun: pip install playwright beautifulsoup4 lxml && playwright install chromium"}
async with async_playwright() as p:
browser = await p.chromium.launch(headless=True)
page = await browser.new_page(
user_agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
)
try:
await page.goto(url, wait_until="domcontentloaded", timeout=30000)
await page.wait_for_selector("#js_content", timeout=15000)
html = await page.content()
except Exception as e:
await browser.close()
return {"error": f"Page load failed: {e}"}
await browser.close()
soup = BeautifulSoup(html, "lxml")
title = (soup.select_one("#activity-name") or soup.new_tag("x")).get_text(strip=True)
author = (soup.select_one("#js_author_name") or soup.new_tag("x")).get_text(strip=True)
date = (soup.select_one("#publish_time") or soup.new_tag("x")).get_text(strip=True)
content_el = soup.select_one("#js_content")
if not content_el:
return {"error": "Could not find #js_content"}
for tag in content_el.find_all(["script", "style"]):
tag.decompose()
for img in content_el.find_all("img"):
src = img.get("data-src") or img.get("src") or ""
img.replace_with(f"\n\n" if src else "")
lines = []
for el in content_el.find_all(["p", "h1", "h2", "h3", "h4", "section", "blockquote"]):
text = el.get_text(strip=True)
if not text:
continue
if el.name in ("h1", "h2", "h3", "h4"):
lines.append(f"{'#' * int(el.name[1])} {text}")
elif el.name == "blockquote":
lines.append(f"> {text}")
else:
lines.append(text)
content = "\n\n".join(lines) or content_el.get_text("\n", strip=True)
return {"title": title, "author": author, "date": date, "url": url, "content": content}
def to_markdown(r: dict) -> str:
if "error" in r:
return f"Error: {r['error']}"
parts = [
"---",
f"title: {yaml_string(r.get('title', ''))}",
*([f"author: {yaml_string(r['author'])}"] if r.get("author") else []),
*([f"date: {yaml_string(r['date'])}"] if r.get("date") else []),
f"url: {yaml_string(r.get('url', ''))}",
"---",
"",
f"# {r['title']}" if r.get("title") else "",
"",
r.get("content", ""),
]
return "\n".join(parts)
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: fetch_weixin.py <url> [--json]", file=sys.stderr)
sys.exit(1)
result = asyncio.run(fetch(sys.argv[1]))
if "--json" in sys.argv:
print(json.dumps(result, ensure_ascii=False, indent=2))
else:
print(to_markdown(result))
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 195k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 195k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 195k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 195k | Updated | Claude CodeCodex | Verified | Install |