[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shortcut Google search result snooping
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Mon, 16 Apr 2012 08:42:43 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11800
- References: <87aa2d2h02.fsf@xxxxxxxxxxx> <b4mr4vod18n.fsf@xxxxxxx>
In [emacs-w3m : No.11799] Katsumi Yamaoka wrote:
> (setq w3m-use-filter t)
> (require 'w3m-filter)
> (defun w3m-filter-google (url)
> "Extract real urls in Google search."
> (goto-char (point-min))
> (while (re-search-forward "\\(<a[\t\n ]+href=\"\\)/url\\?q=\\([^&]+\\)"
> nil t)
> (replace-match "\\1\\2\"")))
I was half asleep, sorry. The regexp should have been:
(defun w3m-filter-google (url)
"Extract real urls in Google search."
(while (re-search-forward "\\(<a[\t\n ]+href=\"\\)/url\\?q=\\([^&]+\\)[^>]+>"
> This replaces the default Google filter function that w3m-filter.el
> has been providing thus far, but I think this becomes the new default.
> Does anyone know this causes any disadvantage to users?