Show
Ignore:
Timestamp:
09/10/05 10:16:00 (3 years ago)
Author:
miyoshi
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/gnus/nnweb.el

    r3809 r3863  
    2727 
    2828;; Note: You need to have `w3' installed for some functions to work. 
     29 
     30;; FIXME: Due to changes in the HTML output of Google Groups and Gmane, stuff 
     31;; related to web groups (gnus-group-make-web-group) doesn't work anymore. 
     32 
     33;; Fetching an article by MID (cf. gnus-refer-article-method) over Google 
     34;; Groups should work. 
    2935 
    3036;;; Code: 
     
    5561(defvar nnweb-type-definition 
    5662  '((google 
    57      (article . ignore
    58      (id . "http://groups.google.de/groups?selm=%s&output=gplain"
     63     (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source"
     64     (article . nnweb-google-wash-article
    5965     (reference . identity) 
    6066     (map . nnweb-google-create-mapping) 
    6167     (search . nnweb-google-search) 
    62      (address . "http://groups.google.de/groups") 
    63      (base    . "http://groups.google.de") 
     68     (address . "http://groups.google.com/groups") 
     69     (base    . "http://groups.google.com") 
    6470     (identifier . nnweb-google-identity)) 
    6571    (dejanews ;; alias of google 
     
    307313 
    308314;;; 
    309 ;;; Deja bought by google.com 
     315;;; groups.google.com 
    310316;;; 
    311317 
    312318(defun nnweb-google-wash-article () 
    313   (let ((case-fold-search t) url) 
     319  ;; We have Google's masked e-mail addresses here.  :-/ 
     320  (let ((case-fold-search t)) 
    314321    (goto-char (point-min)) 
    315     (re-search-forward "^<pre>" nil t) 
    316     (narrow-to-region (point-min) (point)) 
    317     (search-backward "<table " nil t 2) 
    318     (delete-region (point-min) (point)) 
    319     (if (re-search-forward "Search Result [0-9]+" nil t) 
    320         (replace-match "")) 
    321     (if (re-search-forward "View complete thread ([0-9]+ articles?)" nil t) 
    322         (replace-match "")) 
    323     (goto-char (point-min)) 
    324     (while (search-forward "<br>" nil t) 
    325       (replace-match "\n")) 
    326     (mm-url-remove-markup) 
    327     (goto-char (point-min)) 
    328     (while (re-search-forward "^[ \t]*\n" nil t) 
    329       (replace-match "")) 
    330     (goto-char (point-max)) 
    331     (insert "\n") 
    332     (widen) 
    333     (narrow-to-region (point) (point-max)) 
    334     (search-forward "</pre>" nil t) 
    335     (delete-region (point) (point-max)) 
    336     (mm-url-remove-markup) 
    337     (widen))) 
     322    (if (save-excursion 
     323          (or (re-search-forward "The requested message.*could not be found." 
     324                                 nil t) 
     325              (not (and (re-search-forward "^<pre>" nil t) 
     326                        (re-search-forward "^</pre>" nil t))))) 
     327        ;; FIXME: Don't know how to indicate "not found". 
     328        ;; Should this function throw an error?  --rsteib 
     329        (progn 
     330          (gnus-message 3 "Requested article not found") 
     331          (erase-buffer)) 
     332      (delete-region (point-min) 
     333                     (1+ (re-search-forward "^<pre>" nil t))) 
     334      (goto-char (point-min)) 
     335      (delete-region (- (re-search-forward "^</pre>" nil t) (length "</pre>")) 
     336                     (point-max)) 
     337      (mm-url-decode-entities)))) 
    338338 
    339339(defun nnweb-google-parse-1 (&optional Message-ID)