跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[分享创造] 分享一个快速构建 Web Scraper API 的开源工具,只要你会 css 选择器 / JQ 就能快速上手,简单易用。

发表于

工具地址: https://github.com/serping/express-scraper

之前发布的工具Cheerio Tree ,由于还没有文档,没有点代码功底,很难理解工作逻辑。

文档和 DEMO 会陆续更新,此工具拉回来就有简单的 DEMO 用例。

线上的 DEMO ,Scraper API 地址,可以直接打开访问。

https://www.proxysites.ai/category

https://wordpress.com/tags

本工具支持 Vercel 部署,比 nextjs 轻量,vercel 部署时间 20 ~ 30s

特色

  • 数据结构清晰,便于维护, 可以 debug 具体 DOM 节点
  • 快速构建页面 API
  • 自动转换 YAML 为 JSON 变量
  • 根据目录结构生成 typescript 文件

核心工具包

  • expressjs
  • Cheerio - 基于 css 选择器
  • Cheerio Tree - 树结构 HTML 解析器( TO JSON )

关于部署

由于还是个 nodejs 新手,不知道 vercel 如何自动部署 ts 版的 express ,

目前处理方式是 build 输出到 dist ,然后通过配置 vercel.json 实现部署。

如果更新代码忘记 build ,就不会发布最新代码。。。希望哪个大佬可以指点下迷津!

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.