I and a friend recently implemented link grabbing in my Clojure IRC bot. When it sees a link, it slurps the page and grabs the title from the page. The problem is that it has to slurp the ENTIRE page just to grab the link.
How does one go about reading a page lazily until the first </title>?
Use line-seq
but don't forget to close the underlying stream when done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With