[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: Function to parse url contents?

Steven <cureadvocate <at> gmail.com> writes:
> Dear Emacs-w3m:
> I want to write a function that reads a web page (Google Voice) and parses 
> 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 
> parse.
> Should I maybe use with-temp-buffer instead?
> Best,
> Steven

Indeed I should:

  (w3m-retrieve "https://www.google.com/voice/m";)
  (goto-char 1)
  (re-search-forward "unread.>.\\([0-9]+\\).<" nil t)
  (match-string 1))