专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

jez500/seleniumbase-scrapper Docker 镜像 - 轩辕镜像 | Docker 镜像高效稳定拉取服务

热门搜索:openclaw🔥nginx🔥redis🔥mysqlopenjdkcursorweb2apimemgraphzabbixetcdubuntucorednsjdk
seleniumbase-scrapper
jez500/seleniumbase-scrapper
jez500
下载次数: 0状态:社区镜像维护者:jez500仓库类型:镜像最近更新:4 个月前
轩辕镜像,快一点,稳很多。点击查看
镜像简介版本下载
轩辕镜像,快一点,稳很多。点击查看

SeleniumBase API

This project exposes an HTTP API for SeleniumBase, allowing you to fetch web page content and metadata via HTTP requests.

Its API is based on scrapper (which uses playwrite) and uses the same parameters and response format so it should be interchangeable with it.

Running the Container

Start the container with the API server:

bash
docker run -d -p 8000:8000 --name seleniumbase_scrapper jez500/seleniumbase-scrapper

The API will be automatically started and available on port 8000.

Configuration

Environment Variables

You can set default values for all API parameters using environment variables. This is useful for configuring the behavior of the API without changing query parameters for each request.

Example with environment variables:

bash
docker run -d -p 8000:8000 \
  -e DEFAULT_CACHE=true \
  -e DEFAULT_FULL_CONTENT=false \
  -e DEFAULT_SCREENSHOT=false \
  -e DEFAULT_INCOGNITO=true \
  -e DEFAULT_TIMEOUT=60000 \
  -e DEFAULT_SLEEP=1000 \
  --name seleniumbase_scrapper jez500/seleniumbase-scrapper

All available environment variables:

  • DEFAULT_CACHE (default: false)
  • DEFAULT_CACHE_TTL (default: 3600 - cache time-to-live in seconds, 60 minutes)
  • DEFAULT_FULL_CONTENT (default: false)
  • DEFAULT_SCREENSHOT (default: false)
  • DEFAULT_USER_SCRIPTS (default: empty)
  • DEFAULT_USER_SCRIPTS_TIMEOUT (default: 0)
  • DEFAULT_INCOGNITO (default: true)
  • DEFAULT_TIMEOUT (default: 60000)
  • DEFAULT_WAIT_UNTIL (default: domcontentloaded)
  • DEFAULT_SLEEP (default: 0)
  • DEFAULT_RESOURCE (default: empty, all resources allowed)
  • DEFAULT_VIEWPORT_WIDTH (default: empty)
  • DEFAULT_VIEWPORT_HEIGHT (default: empty)
  • DEFAULT_SCREEN_WIDTH (default: empty)
  • DEFAULT_SCREEN_HEIGHT (default: empty)
  • DEFAULT_DEVICE (default: Desktop Chrome)
  • DEFAULT_SCROLL_DOWN (default: 0)
  • DEFAULT_IGNORE_HTTPS_ERRORS (default: true)
  • DEFAULT_USER_AGENT (default: empty)
  • DEFAULT_LOCALE (default: empty)
  • DEFAULT_TIMEZONE (default: empty)
  • DEFAULT_HTTP_CREDENTIALS (default: empty)
  • DEFAULT_EXTRA_HTTP_HEADERS (default: empty)
User Scripts

User scripts allow you to execute custom JavaScript code on the page after it loads but before article extraction begins. This is useful for:

  • Removing advertisements
  • Clicking cookie consent buttons
  • Handling modal popups
  • Customizing page content

To use user scripts:

  1. Create your JavaScript files and place them in the api/user_scripts directory
  2. Reference them in the API call using the user-scripts parameter

Example user script (api/user_scripts/example-remove-ads.js):

javascript
// Remove common ad elements
(function() {
    const adSelectors = ['.advertisement', '.ad-container', '.ads', '#ad'];
    adSelectors.forEach(selector => {
        document.querySelectorAll(selector).forEach(el => el.remove());
    });
})();

Usage:

bash
curl -X GET "http://localhost:8000/api/article?url=https://example.com&user-scripts=example-remove-ads.js"

Multiple scripts can be specified separated by commas:

bash
curl -X GET "http://localhost:8000/api/article?url=https://example.com&user-scripts=remove-ads.js,accept-cookies.js"

API Endpoints

GET /api/article

Fetches article content and metadata from a specified URL using SeleniumBase.

Parameters:

All parameters except url have default values that can be set via environment variables (with DEFAULT_ prefix).

Scraper Settings
ParameterDescriptionDefaultEnv Variable
urlPage URL. The page should contain the text of the article that needs to be extracted.(required)-
cacheAll scraping results are always saved to disk. This parameter determines whether to retrieve results from cache or execute a new request. When set to true, existing cached results will be returned if available. By default, cache reading is disabled, so each request is processed anew.falseDEFAULT_CACHE
full-contentIf this option is set to true, the result will have the full HTML contents of the page (fullContent field in the response).falseDEFAULT_FULL_CONTENT
screenshotIf this option is set to true, the result will have the link to the screenshot of the page (screenshotUri field in the response). Scrapper initially attempts to take a screenshot of the entire scrollable page. If it fails because the image is too large, it will only capture the currently visible viewport.falseDEFAULT_SCREENSHOT
user-scriptsTo use your JavaScript scripts on a webpage, put your script files into the user_scripts directory. Then, list the scripts you need in the user-scripts parameter, separating them with commas. These scripts will run after the page loads but before the article parser starts. This means you can use these scripts to do things like remove ad blocks or automatically click the cookie acceptance button. Keep in mind, script names cannot include commas, as they are used for separation.
For example, you might pass example-remove-ads.js.
DEFAULT_USER_SCRIPTS
user-scripts-timeoutWaits for the given timeout in milliseconds after users scripts injection. For example if you want to navigate through page to specific content, set a longer period (higher value). The default value is 0, which means no sleep.0DEFAULT_USER_SCRIPTS_TIMEOUT
Browser Settings
ParameterDescriptionDefaultEnv Variable
incognitoAllows creating incognito browser contexts. Incognito browser contexts don't write any browsing data to disk.trueDEFAULT_INCOGNITO
timeoutMaximum operation time to navigate to the page in milliseconds; defaults to 60000 (60 seconds). Pass 0 to disable the timeout.60000DEFAULT_TIMEOUT
wait-untilWhen to *** navigation succeeded, defaults to domcontentloaded. Events can be either:
load - *** operation to be finished when the load event is fired.
domcontentloaded - *** operation to be finished when the DOMContentLoaded event is fired.
networkidle - *** operation to be finished when there are no network connections for at least 500 ms.
commit - *** operation to be finished when network response is received and the document started loading.
domcontentloadedDEFAULT_WAIT_UNTIL
sleepWaits for the given timeout in milliseconds before parsing the article, and after the page has loaded. In many cases, a sleep timeout is not necessary. However, for some websites, it can be quite useful. Other waiting mechanisms, such as waiting for selector visibility, are not currently supported. The default value is 0, which means no sleep.0DEFAULT_SLEEP
resourceList of resource types allowed to be loaded on the page. All other resources will not be allowed, and their network requests will be aborted. By default, all resource types are allowed. The following resource types are supported: document, stylesheet, image, media, font, script, texttrack, xhr, fetch, eventsource, websocket, manifest, other. Example: document,stylesheet,fetch.DEFAULT_RESOURCE
viewport-widthThe viewport width in pixels. It's better to use the device parameter instead of specifying it explicitly.DEFAULT_VIEWPORT_WIDTH
viewport-heightThe viewport height in pixels. It's better to use the device parameter instead of specifying it explicitly.DEFAULT_VIEWPORT_HEIGHT
screen-widthThe page width in pixels. Emulates consistent window screen size available inside web page via window.screen. Is only used when the viewport is set.DEFAULT_SCREEN_WIDTH
screen-heightThe page height in pixels.DEFAULT_SCREEN_HEIGHT
deviceSimulates browser behavior for a specific device, such as user agent, screen size, viewport, and whether it has touch enabled.
Individual parameters like user-agent, viewport-width, and viewport-height can also be used; in such cases, they will override the device settings.
Desktop ChromeDEFAULT_DEVICE
scroll-downScroll down the page by a specified number of pixels. This is particularly useful when dealing with lazy-loading pages (pages that are loaded only as you scroll down). This parameter is used in conjunction with the sleep parameter. Make sure to set a positive value for the sleep parameter, otherwise, the scroll function won't work.0DEFAULT_SCROLL_DOWN
ignore-https-errorsWhether to ignore HTTPS errors when sending network requests. The default setting is to ignore HTTPS errors.trueDEFAULT_IGNORE_HTTPS_ERRORS
user-agentSpecific user agent. It's better to use the device parameter instead of specifying it explicitly.DEFAULT_USER_AGENT
localeSpecify user locale, for example en-GB, de-DE, etc. Locale will affect navigator.language value, Accept-Language request header value as well as number and date formatting rules.DEFAULT_LOCALE
timezoneChanges the timezone of the context. See ICU's metaZones.txt for a list of supported timezone IDs.DEFAULT_TIMEZONE
http-credentialsCredentials for HTTP authentication (string containing username and password separated by a colon, e.g. username:password).DEFAULT_HTTP_CREDENTIALS
extra-http-headersContains additional HTTP headers to be sent with every request. Example: X-API-Key:***;X-Auth-Token:abcdef.DEFAULT_EXTRA_HTTP_HEADERS

Examples:

Basic usage:

bash
curl -X GET "http://localhost:8000/api/article?url=https://en.***.org/wiki/web_scraping"

With caching enabled:

bash
curl -X GET "http://localhost:8000/api/article?url=https://example.com&cache=true"

With full content and screenshot:

bash
curl -X GET "http://localhost:8000/api/article?url=https://example.com&full-content=true&screenshot=true"

With custom viewport and sleep:

bash
curl -X GET "http://localhost:8000/api/article?url=https://example.com&viewport-width=1024&viewport-height=768&sleep=2000"

With user scripts:

bash
curl -X GET "http://localhost:8000/api/article?url=https://example.com&user-scripts=example-remove-ads.js&user-scripts-timeout=1000"

With scroll for lazy-loading content:

bash
curl -X GET "http://localhost:8000/api/article?url=https://example.com&scroll-down=1000&sleep=2000"

Response Fields:

The response to the /api/article request returns a JSON object containing the following fields:

ParameterDescriptionType
bylineauthor metadatanull or str
contentHTML string of processed article contentnull or str
dircontent directionnull or str
excerptarticle description, or short excerpt from the contentnull or str
fullContentfull HTML contents of the pagenull or str
idunique result IDstr
urlpage URL after redirects, may not match the query URLstr
domainpage's registered domainstr
langcontent languagenull or str
lengthlength of extracted article, in charactersnull or int
datedate of extracted article in ISO 8601 formatstr
queryrequest parametersobject
metasocial meta tags (open graph, ***)object
resultUriURL of the current result, the data here is always taken from cachestr
screenshotUriURL of the screenshot of the pagenull or str
siteNamename of the sitenull or str
textContenttext content of the article, with all the HTML tags removednull or str
titlearticle titlenull or str
publishedTimearticle publication timenull or str

Example Response:

json
{
  "id": "13cfc98ddfe0fd340fbccd298ada8c17",
  "url": "[***]",
  "domain": "en.***.org",
  "title": "Web scraping - ***",
  "byline": null,
  "excerpt": null,
  "siteName": null,
  "content": "<article>...</article>",
  "textContent": "Web scraping - ***\nJump to content...",
  "length": 27104,
  "lang": "en",
  "dir": "ltr",
  "publishedTime": null,
  "fullContent": "<html>...</html>",
  "date": "2025-11-11T22:37:42.235424Z",
  "query": {
    "url": "[***]"
  },
  "meta": {
    "og_title": "Web scraping - ***",
    "og_type": "website"
  },
  "resultUri": "api://article/13cfc98ddfe0fd340fbccd298ada8c17",
  "screenshotUri": null
}

Error Handling:

Error responses follow this structure:

json
{
  "detail": [
    {
      "type": "error_type",
      "msg": "some message"
    }
  ]
}

For detailed error information, consult the Docker container logs.

Response Codes:

  • Success (200): Returns JSON with article data and metadata
  • Error (400): Missing URL parameter
  • Error (500): Failed to fetch URL
GET /health

Health check endpoint to verify the API is running.

Example:

bash
curl -X GET "http://localhost:8000/health"

Response:

json
{
  "status": "healthy",
  "service": "jez500/seleniumbase-scrapper"
}
GET /

Root endpoint that provides API documentation.

Example:

bash
curl -X GET "http://localhost:8000/"

Response:

json
{
  "service": "SeleniumBase API",
  "version": "1.0.0",
  "endpoints": {
    "/api/article": {
      "method": "GET",
      "description": "Fetch HTML content from a URL",
      "parameters": {
        "url": "The URL to fetch (required)"
      },
      "example": "/api/article?url=[***]"
    },
    "/health": {
      "method": "GET",
      "description": "Health check endpoint"
    }
  }
}

Usage Examples

Fetch *** Page
bash
curl -X GET "http://localhost:8000/api/article?url=https://en.***.org/wiki/Python_(programming_language)"
Fetch Any Website
bash
curl -X GET "http://localhost:8000/api/article?url=https://[***]"
Save HTML to File
bash
curl -X GET "http://localhost:8000/api/article?url=https://[***]" -o output.html

Features

  • Headless Browser: Uses Chrome in headless mode for efficient scraping
  • JavaScript Rendering: Fully renders JavaScript-heavy pages
  • Undetected Mode: Uses SeleniumBase's undetected mode to bypass bot detection
  • Error Handling: Proper error responses with meaningful messages
  • Auto Cleanup: Automatically closes browser drivers after each request

Technical Details

  • Framework: Flask
  • Browser: Chrome (headless)
  • Port: 8000
  • SeleniumBase Driver: UC mode enabled for better compatibility

Container Management

View Logs
bash
docker logs seleniumbase_scrapper
Stop Container
bash
docker stop seleniumbase_scrapper
Start Existing Container
bash
docker start seleniumbase_scrapper
Remove Container
bash
docker rm -f seleniumbase_scrapper

Interactive Mode

You can also run the container interactively while still having the API available:

bash
docker run -it -p 8000:8000 --name seleniumbase_scrapper jez500/seleniumbase-scrapper

The API server will start automatically in the background, and you'll have access to a bash shell.

Troubleshooting

Check if API is running
bash
curl http://localhost:8000/health
View API logs inside container
bash
docker exec -it jez500/seleniumbase-scrapper bash
# Then check for the API process
ps aux | grep python
Port already in use

If port 8000 is already in use, map to a different port:

bash
docker run -d -p 9000:8000 --name seleniumbase_scrapper jez500/seleniumbase-scrapper
curl -X GET "http://localhost:9000/api/article?url=https://example.com"
查看更多 seleniumbase-scrapper 相关镜像 →
selenium/standalone-chrome logo
selenium/standalone-chrome
selenium
Selenium Grid的独立模式(Standalone mode)是一种集成了中心节点(hub)与执行节点(node)功能的简化测试部署方式,配合Chrome浏览器使用时,可在本地或小型测试环境中通过单一进程便捷启动,支持并行执行基于Selenium的自动化测试脚本,无需额外配置独立的中心节点与执行节点,有效简化测试环境搭建流程,提升测试效率,适用于快速验证测试用例或小规模自动化测试场景。
637 次收藏5亿+ 次下载
9 小时前更新
selenium/node-chrome logo
selenium/node-chrome
selenium
Selenium Grid节点模式(搭配Chrome浏览器)是一种分布式自动化测试组件,作为硒网格架构中的工作节点,可接收中心集线器(Hub)分配的测试任务,在本地Chrome浏览器环境中执行Web应用自动化测试,支持多版本Chrome浏览器配置与并行测试任务处理,能有效提升大规模测试场景下的执行效率与资源利用率,适用于跨环境、多任务的Web应用自动化测试流程。
271 次收藏1亿+ 次下载
9 小时前更新
selenium/hub logo
selenium/hub
selenium
Selenium Grid Hub模式镜像作为分布式测试中心节点,用于接收并分配测试请求至各执行节点,实现跨环境自动化测试任务的并行管理与执行。
463 次收藏1亿+ 次下载
9 小时前更新
selenium/node-firefox logo
selenium/node-firefox
selenium
用于Selenium Grid的Firefox节点镜像,可与Selenium Grid Hub配合使用,支持远程运行WebDriver测试。
155 次收藏5000万+ 次下载
9 小时前更新
selenium/standalone-firefox logo
selenium/standalone-firefox
selenium
Selenium网格独立模式镜像,集成Firefox浏览器,用于分布式Web自动化测试,支持单节点简化部署。
197 次收藏5000万+ 次下载
9 小时前更新
selenium/base logo
selenium/base
selenium
所有Selenium Grid镜像共享的基础镜像,不直接使用。
47 次收藏500万+ 次下载
9 小时前更新

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

docker search 报错:专属域名下仅支持 Docker Hub 查询

docker search 报错问题

网页搜不到镜像:Docker Hub 有但轩辕镜像搜索无结果

镜像搜索不到

离线传输镜像:无法直连时用 docker save/load 迁移

离线传输镜像

Docker 插件安装错误:application/vnd.docker.plugin.v1+json

Docker 插件安装错误

WSL 下 Docker 拉取慢:网络与挂载目录影响及优化

WSL 拉取镜像慢

轩辕镜像是否安全?镜像完整性校验(digest)说明

镜像安全性

如何用轩辕镜像拉取镜像?登录方式与专属域名配置

如何拉取镜像

错误码与失败问题

manifest unknown 错误:镜像不存在或标签错误

manifest unknown 错误

TLS/SSL 证书验证失败:Docker pull 时 HTTPS 证书错误

TLS 证书验证失败

DNS 解析超时:无法解析镜像仓库地址或连接超时

DNS 解析超时

410 Gone 错误:Docker 版本过低导致协议不兼容

410 错误:版本过低

402 Payment Required 错误:流量耗尽错误提示

402 错误:流量耗尽

401 UNAUTHORIZED 错误:身份认证失败或登录信息错误

身份认证失败错误

429 Too Many Requests 错误:请求频率超出专业版限制

429 限流错误

Docker login 凭证保存错误:Cannot autolaunch D-Bus(不影响登录)

凭证保存错误

账号 / 计费 / 权限

免费版与专业版区别:功能、限额与使用场景对比

免费版与专业版区别

支持的镜像仓库:Docker Hub、GCR、GHCR、K8s 等列表

轩辕镜像支持的镜像仓库

拉取失败是否扣流量?计费规则说明

拉取失败流量计费

KYSEC 权限不够:麒麟 V10/统信 UOS 下脚本执行被拦截

KYSEC 权限错误

如何申请开具发票?(增值税普票/专票)

开具发票

如何修改网站与仓库登录密码?

修改网站和仓库密码

配置与原理类

registry-mirrors 未生效:仍访问官方仓库或报错的原因

registry-mirrors 未生效

如何去掉镜像名称中的轩辕域名前缀?(docker tag)

去掉域名前缀

如何拉取指定架构镜像?(ARM64/AMD64 等多架构)

拉取指定架构镜像

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
jez500/seleniumbase-scrapper
博客公告Docker 镜像公告与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单,官方技术交流群:1072982923。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单,官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.