# -*- coding: utf-8 -*-
import io, re, sys
t = io.open(sys.argv[1], encoding="utf-8", errors="ignore").read()
print("LINKS:", re.findall(r'href="([^"]+)"', t)[:80])
p = re.sub(r'<script.*?</script>|<style.*?</style>', ' ', t, flags=re.S | re.I)
p = re.sub(r'<[^>]+>', ' ', p)
p = re.sub(r'\s+', ' ', p)
print("TEXT:", p[:2500])
