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

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