[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Function to parse url contents?
- From: Steven <cureadvocate@xxxxxxxxx>
- Date: Sat, 8 Jun 2013 00:33:45 +0000 (UTC)
- X-ml-name: emacs-w3m
- X-mail-count: 12047
- References: <loom.20130607T122105-807@xxxxxxxxxxxxxx>
Steven <cureadvocate <at> gmail.com> writes:
> Dear Emacs-w3m:
>
> I want to write a function that reads a web page (Google Voice) and parses
it
> to return the number of messages in my inbox. I see w3m-retrieve and w3m-
> browse-url, but neither of them will store the page contents in a variable
to
> parse.
>
> Should I maybe use with-temp-buffer instead?
>
> Best,
>
> Steven
Indeed I should:
(with-temp-buffer
(w3m-retrieve "https://www.google.com/voice/m")
(goto-char 1)
(re-search-forward "unread.>.\\([0-9]+\\).<" nil t)
(match-string 1))