summaryrefslogtreecommitdiff
path: root/remove-tags.sh
diff options
context:
space:
mode:
Diffstat (limited to 'remove-tags.sh')
-rwxr-xr-xremove-tags.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/remove-tags.sh b/remove-tags.sh
new file mode 100755
index 0000000..c1a5c1e
--- /dev/null
+++ b/remove-tags.sh
@@ -0,0 +1,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
+ '