Harleqin wrote:- Reading a page into a string should be possible much easier.
The easy way is to use DRAKMA.
- Code: Select all
(drakma:http-request uri)
will return you a string (http-request has _a lot_ of options, it can return not just strings).
Harleqin wrote:- Reading a page into a string should be possible much easier.
(drakma:http-request uri)
schoppenhauer wrote:Try itHarleqin wrote:Regarding the HTML parsing: I haven't done this before, but I thought of Closure HTML.(Its possible, but annoying)
(defun get-entries (path)
(let ((page (chtml:parse (trivial-http:http-get path) (stp:make-builder)))
(entries ()))
(stp:do-recursively (el page)
(when (and (typep el 'stp:element)
(equal (stp:local-name el) "a")
(equal (stp:attribute-value el "class") "topictitle"))
(push (cons (stp:attribute-value el "href")
(stp:string-value el))
entries)))))
schoppenhauer wrote:Maybe another interesting question would be whether the thing it basically does is usefull to provide an RSS-Feed for this Forum (no matter how exactly it is implemented now).
Jasper wrote:Just +1 on wanting RSS. Tbh that this forum system doesn't support it defaultly seems little pathetic... I made an(admittedly untested) rss writer for 'my' project, and it isn't that hard..
Not to diss anyone except for phpBB board :p
Users browsing this forum: No registered users and 2 guests