N
N
nak-alexey2020-07-15 13:26:08
bash
nak-alexey, 2020-07-15 13:26:08

HTML parser in Bash?

Is there any html parser for bash? You need to pull the table from the site and work with its data.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
pfg21, 2020-07-15
@pfg21

take a parser in any scripting language, and in bash use its output to stdout.
will be both simpler and more native.

S
Saboteur, 2020-07-16
@saboteur_kiev

xmllint
For some sites, grep/sed/awk is fine too.

X
xotkot, 2020-07-15
@xotkot

in the simplest version, you can use pup to tear out a table and overtake it into json, and then process the necessary data using jq
curl -s 'URL' | pup 'table json{}' | jq ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question