Perform advanced web crawling and content extraction with multi-page crawling, search result parsing, pattern filtering, and screenshot capture using the Wry...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install wrynai-skill或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install wrynai-skill⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/wrynai-skill/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
This skill enables OpenClaw to perform advanced web crawling and content extraction using the WrynAI SDK. It provides capabilities for multi-page crawling, content extraction, search engine results parsing, and intelligent data gathering from websites.
# Install the WrynAI SDK
pip install wrynai
# Set your API key as environment variable
export WRYNAI_API_KEY="your-api-key-here"
Sign up at https://wryn.ai to obtain an API key. The key must be set in the WRYNAI_API_KEY environment variable.
Use this when the user wants to crawl an entire website or section of a website.
import os
from wrynai import WrynAI, WrynAIError
def crawl_website(url: str, max_pages: int = 10) -> dict:
"""
Crawl a website starting from the given URL.
Args:
url: Starting URL for the crawl
max_pages: Maximum number of pages to crawl (hard limit: 10)
Returns:
Dictionary containing crawl results with pages and their content
"""
api_key = os.environ.get("WRYNAI_API_KEY")
if not api_key:
raise ValueError("WRYNAI_API_KEY environment variable required")
try:
with WrynAI(api_key=api_key) as client:
result = client.crawl(
url=url,
max_pages=min(max_pages, 10), # Hard limit enforced
max_depth=3,
return_urls=True,
)
return {
"success": result.success,
"total_pages": result.total_pages,
"total_visited": result.total_visited,
"pages": [
{
"url": page.page_url,
"content": page.content,
"urls_found": len(page.urls),
"discovered_urls": page.urls[:10], # First 10 URLs
}
for page in result.pages
],
}
except WrynAIError as e:
return {
"success": False,
"error": str(e),
"status_code": getattr(e, 'status_code', None),
}
When to use:
Specialized crawling for documentation sites with pattern filtering.
from wrynai import WrynAI, Engine
def crawl_documentation(base_url: str, doc_patterns: list = None) -> list:
"""
Crawl documentation sites with targeted URL patterns.
Args:
base_url: Base URL of the documentation site
doc_patterns: List of URL patterns to include (e.g., ["/docs/", "/api/"])
Returns:
List of crawled documentation pages with content
"""
api_key = os.environ.get("WRYNAI_API_KEY")
doc_patterns = doc_patterns or ["/docs/", "/guide/", "/api/", "/reference/"]
with WrynAI(api_key=api_key) as client:
result = client.crawl(
url=base_url,
max_pages=10,
max_depth=3,
include_patterns=doc_patterns,
exclude_patterns=["/internal/", "/draft/", "/changelog/", "/admin/"],
return_urls=True,
timeout_ms=60000, # 60 seconds for documentation crawling
)
return [
{
"url": page.page_url,
"content": page.content,
"word_count": len(page.content.split()),
}
for page in result.pages
]
When to use:
Search for topics and crawl the top results.
from wrynai import WrynAI, CountryCode, WrynAIError
import time
def search_and_crawl(query: str, num_sites: int = 3, country: str = "US") -> list:
"""
Search for a query and crawl the top results.
Args:
query: Search query
num_sites: Number of top results to crawl
country: Country code for search localization
Returns:
List of search results with crawled content
"""
api_key = os.environ.get("WRYNAI_API_KEY")
with WrynAI(api_key=api_key) as client:
# Step 1: Perform search
try:
search_result = client.search(
query=query,
num_results=num_sites,
country_code=getattr(CountryCode, country, CountryCode.US),
timeout_ms=120000,
)
except WrynAIError as e:
return [{"error": f"Search failed: {str(e)}"}]
# Step 2: Crawl each result
results = []
for result in search_result.organic_results[:num_sites]:
try:
crawl_result = client.crawl(
url=result.url,
max_pages=3,
max_depth=1,
timeout_ms=60000,
)
results.append({
"search_position": result.position,
"title": result.title,
"url": result.url,
"snippet": result.snippet,
"crawled_pages": [
{
"url": page.page_url,
"content_preview": page.content[:500],
"full_content": page.content,
}
for page in crawl_result.pages
],
})
# Rate limiting courtesy
time.sleep(1)
except WrynAIError as e:
results.append({
"title": result.title,
"url": result.url,
"error": str(e),
})
return results
When to use:
Extract specific content types without crawling.
from wrynai import WrynAI, Engine
...安装 WrynAI Skill 后,可以对 AI 说这些话来触发它
Help me get started with WrynAI Skill
Explains what WrynAI Skill does, walks through the setup, and runs a quick demo based on your current project
Use WrynAI Skill to perform advanced web crawling and content extraction with multi-pag...
Invokes WrynAI Skill with the right parameters and returns the result directly in the conversation
What can I do with WrynAI Skill in my design & creative workflow?
Lists the top use cases for WrynAI Skill, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/wrynai-skill/ 目录(个人级,所有项目可用),或 .claude/skills/wrynai-skill/(项目级)。重启 AI 客户端后,用 /wrynai-skill 主动调用,或让 AI 根据上下文自动发现并使用。
WrynAI Skill 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
WrynAI Skill 可免费安装使用。请查阅仓库了解许可证信息。
Perform advanced web crawling and content extraction with multi-page crawling, search result parsing, pattern filtering, and screenshot capture using the Wry...
WrynAI Skill 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using WrynAI Skill
Identifies repetitive steps in your workflow and sets up WrynAI Skill to handle them automatically