Web scraping and browser automation using AgentQL — query any webpage with natural language to extract structured data, interact with elements, and automate browser tasks. Use when asked to scrape, extract data from, or automate interactions on a webpage using natural language queries.
AgentQL 允许您使用自然语言查询网页,以提取结构化数据并自动化浏览器交互。它在底层使用 Playwright。
AgentQL 需要一个 API 密钥。将其设置为环境变量:
bash
export AGENTQLAPIKEY=your-api-key
在 https://dev.agentql.com 获取免费 API 密钥
python
import agentql
from playwright.syncapi import syncplaywright
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = agentql.wrap(browser.new_page())
page.goto(https://example.com)
# 使用自然语言查询
response = page.query_data(
{
title
main_heading
description
}
)
print(response)
browser.close()
bash
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 agentql-1776014612 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 agentql-1776014612 技能
skillhub install agentql-1776014612
文件大小: 1.51 KB | 发布时间: 2026-4-13 09:12