当前位置: 首页 > news >正文

wordpress 上传网站吗企业网站空间多大

wordpress 上传网站吗,企业网站空间多大,百度在线识别图片,网站的最近浏览 怎么做Crawl4AI,开源LLM 友好型的网页爬虫和抓取工具,与Ollama无缝衔接。 基于Crawl4AI,文本信息的解析和提取,不需要编码,仅使用文本描述即可。 Crawl4AI无须 API 密钥,可轻松与Docker和云环境集成。 https:/…

Crawl4AI,开源LLM 友好型的网页爬虫和抓取工具,与Ollama无缝衔接。

基于Crawl4AI,文本信息的解析和提取,不需要编码,仅使用文本描述即可。

Crawl4AI无须 API 密钥,可轻松与Docker和云环境集成。

https://github.com/unclecode/crawl4ai

1 Crawl4AI安装

pip install -U crawl4ai

pip install "crawl4ai[ai]"
python -m playwright install --with-deps chromium

crawl4ai-setup

2 示例运行

url按爬取网页设置

import asyncio
from crawl4ai import *async def main():async with AsyncWebCrawler() as crawler:result = await crawler.arun(url="https://export.shobserver.com/baijiahao/html/960747.html",)print(result.markdown)if __name__ == "__main__":asyncio.run(main())

3 LLM辅助

Crawl4AI可以借助LLM模型提取提取信息。

假设本地ollama已经安装,具体过程参考

在mac m1基于ollama运行deepseek r1_mac m1 ollama-CSDN博客

mac m1计算慢,所以使用4b的小模型。

ollama pull qwen3:4b

以下Crawl4AI代码基于网络资料修改。

任务是从官网https://openai.com/api/pricing提取OpenAI各模型的调用价格。

import os
import json
import asynciofrom pydantic import BaseModel, Field
from crawl4ai import AsyncWebCrawler, CrawlerRunConfig, LLMConfig, BrowserConfig, CacheMode
from crawl4ai.extraction_strategy import LLMExtractionStrategyclass OpenAIModelFee(BaseModel):model_name: str = Field(..., description="Name of the OpenAI model.")input_fee: str = Field(..., description="Fee for input token for the OpenAI model.")output_fee: str = Field(..., description="Fee for output token for the OpenAI model.")async def extract_structured_data_using_llm(provider: str, api_token: str = None, extra_headers: dict[str, str] = None
):print(f"\n--- Extracting Structured Data with {provider} ---")# if api_token is None and provider != "ollama":#     print(f"API token is required for {provider}. Skipping this example.")#     returnbrowser_config = BrowserConfig(headless=False)extra_args = {"temperature": 0, "top_p": 0.9, "max_tokens": 2000}if extra_headers:extra_args["extra_headers"] = extra_headerscrawler_config = CrawlerRunConfig(cache_mode=CacheMode.BYPASS,word_count_threshold=1,page_timeout=80000,extraction_strategy=LLMExtractionStrategy(llm_config=LLMConfig(provider=provider, api_token=api_token),schema=OpenAIModelFee.model_json_schema(),extraction_type="schema",instruction="""From the crawled content, extract all mentioned model names along with their fees for input and output tokens.Do not miss any models in the entire content.""",extra_args=extra_args,),)async with AsyncWebCrawler(config=browser_config) as crawler:result = await crawler.arun(url="https://openai.com/api/pricing/", config=crawler_config)print(result.extracted_content)if __name__ == "__main__":asyncio.run(extract_structured_data_using_llm(provider="ollama/qwen3:4b", api_token=os.getenv("")))

提取结果

[
    {
        "model_name": "gpt-4o",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "gpt-4o-mini",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "gpt-4.1",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "gpt-4.1-mini",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "gpt-4.1-nano",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "o3",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "o3-deep-research",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "o3-pro-2025-06-10",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "o4-mini",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "o4-mini-deep-research",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "o1",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "o1-pro",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "codex-mini-latest",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "computer-use-preview",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "gpt-4.5-preview",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "gpt-image-1",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "gpt-4o-2024-05-13",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "gpt-4o-mini",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "gpt-4.5-preview",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "gpt-image-1",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "codex-mini-latest",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    },
    {
        "model_name": "computer-use-preview",
        "input_fee": "$0.000263",
        "output_fee": "$1.25"
    }
]

reference

---

Browser, Crawler & LLM Configuration (Quick Overview)

https://docs.crawl4ai.com/core/browser-crawler-config/

craw4ai

https://github.com/unclecode/crawl4ai

在Crawl4AI中使用Ollama作为LLM后端的配置指南

在Crawl4AI中使用Ollama作为LLM后端的配置指南 - GitCode博客

如何使用 Crawl4AI 和 DeepSeek 构建 AI 爬虫

https://www.bright.cn/blog/web-data/crawl4ai-and-deepseek-web-scraping

入门Crawl4AI

https://geekdaxue.co/read/Crawl4AI/quickstart

使用crawl4ai+llm用自然语言获取想要爬取的网页内容

https://zhuanlan.zhihu.com/p/1914099510856119201

http://www.dtcms.com/a/459673.html

相关文章:

  • 上海景泰建设股份有限公司网站做网站赚钱一般做什么
  • 北京南站到北京西站一个企业网站的建设流程
  • wordpress下一篇东莞推广seo关键词排名优化
  • 做网站工具wordpress ajax error
  • 英文seo网站建设服装网站建设的规模和类别
  • 做网站什么内容国内网站在国外访问很慢
  • godaddy如何上传网站wordpress文章底部加分享
  • 丹阳网站建设策划wordpress 上下页导航
  • 长沙网站建设zh68凡科建站怎么导出网页
  • 郑州主动营销网站seo推广多少钱
  • 定西市建设网站费用网站优化的分析
  • 注册个免费网站重庆市建设工程信息网官方
  • 网站建设案例步骤电商运营模式
  • c 如何做公司网站视频拍摄手法
  • 广州番禺哪里有学网站建设免费建网站平台
  • 网站怎样做地理位置定位扁平化风格网站模板
  • 网站建设技术方面论文菏泽网站建设公司排名
  • 现在公司网站重要吗网站想换空间
  • 上海市住房和城乡建设厅网站首页太原网站建设公司排名
  • 做网站框架浏览时怎么变长网站做pc
  • 如何做内容收费的网站做美食教程的网站
  • 经典手机网站网站开发环境写什么
  • 做毕设好的网站如何做高大上的网站 知乎
  • 厦门网站制作案例seo发外链网站
  • 徐州网站优化推广贷款引流推广平台
  • 芍药居网站建设公司网络装修公司
  • 凡客 网站设计个体工商户如何注销
  • 网站搭建文案外贸网站建设官网
  • 做黎川旅游网站的目的做网站推广被骗
  • 网站备案域名怎么买cms