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

Re: shortcut Google search result snooping



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."
  (goto-char (point-min))
  (while (re-search-forward "\\(<a[\t\n ]+href=\"\\)/url\\?q=\\([^&]+\\)[^>]+>"
			    nil t)
    (replace-match "\\1\\2\">")))

> 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?