小编Fab*_*ian的帖子

在 Shell 脚本中使用 CURL 解析 HTML

我正在尝试在 shell 脚本中解析网页的特定内容。

我需要标签grep内的内容<div>

<div class="tracklistInfo">
<p class="artist">Diplo - Justin Bieber - Skrillex</p>
<p>Where Are U Now</p>
</div>
Run Code Online (Sandbox Code Playgroud)

如果我使用grep -E -m 1 -o '<div class="tracklistInfo">',简历只是<div class="tracklistInfo">

我如何访问艺术家(Diplo - Justin Bieber - Skrillex)以及如何访问标题(Where Are U Now)

html shell curl

4
推荐指数
2
解决办法
9556
查看次数

标签 统计

curl ×1

html ×1

shell ×1