普贤教程 › 包参考
scraper 包
网页爬虫(HTML 解析/链接提取,纯函数)
scraper.px — 网页爬虫(HTML 解析/链接提取,纯函数)
| 项 | 值 |
|---|---|
| 包名 | scraper |
| 版本 | 0.1.0 |
| 入口 | scraper.px |
| 分类 | Web 与 HTTP |
| 文件数 / 行数 | 1 / 145 |
安装与引入
bash
pxpkg init # 首次 pxpkg add scraper@0.1.0 pxpkg install
px
import scraper所属分类教程:Web 与 HTTP
其余 10 个 def(内部与辅助,可直接调用但不属稳定接口)
| 函数 | 参数 |
|---|---|
sc_extract_links | html |
sc_extract_src | html |
sc_extract_images | html |
sc_extract_text | html |
sc_extract_title | html |
sc_extract_meta | html, name |
sc_extract_meta_all | html |
sc_strip_tags | html |
_sc_find_from | s, sub, start |
_sc_rfind_char | s, ch, end |
包内说明(源码头注释)
text
scraper.px — 网页爬虫(HTML 解析/链接提取,纯函数)