summaryrefslogtreecommitdiff
path: root/remove-tags.sh
blob: c1a5c1ebf572ff0e579bb74611a6cbabc923b5d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

curl -x 'socks5://127.0.0.1:9050' -s "$1" \
  | sed '
    s/>/>\n/g
    s/</\n</g
  ' \
  | sed -n '
    /^<!--/,/-->$/ d
    /^<script[ >]/,\,^</script>$, d
    /^<body\(>$\|\s\)/,\,^</body>$, p
  ' \
  | sed '
    s/<[^<>]*>//g
  '