Changeset 3863 for trunk/lisp/gnus/nnweb.el
- Timestamp:
- 09/10/05 10:16:00 (3 years ago)
- Files:
-
- trunk/lisp/gnus/nnweb.el (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/gnus/nnweb.el
r3809 r3863 27 27 28 28 ;; 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. 29 35 30 36 ;;; Code: … … 55 61 (defvar nnweb-type-definition 56 62 '((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) 59 65 (reference . identity) 60 66 (map . nnweb-google-create-mapping) 61 67 (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") 64 70 (identifier . nnweb-google-identity)) 65 71 (dejanews ;; alias of google … … 307 313 308 314 ;;; 309 ;;; Deja bought bygoogle.com315 ;;; groups.google.com 310 316 ;;; 311 317 312 318 (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)) 314 321 (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)))) 338 338 339 339 (defun nnweb-google-parse-1 (&optional Message-ID)
