From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61615 Path: news.gmane.org!not-for-mail From: Andreas Seltenreich Newsgroups: gmane.emacs.gnus.general Subject: Re: nnweb fix Date: Sat, 31 Dec 2005 11:48:20 +0100 Message-ID: <87hd8pmtjf.fsf@gate450.dyndns.org> References: <877j9lob4v.fsf@gate450.dyndns.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1136026230 1854 80.91.229.2 (31 Dec 2005 10:50:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 31 Dec 2005 10:50:30 +0000 (UTC) Original-X-From: ding-owner+m10147@lists.math.uh.edu Sat Dec 31 11:50:28 2005 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EseJZ-0006be-O9 for ding-account@gmane.org; Sat, 31 Dec 2005 11:50:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EseJV-0002xu-00; Sat, 31 Dec 2005 04:50:17 -0600 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EseHn-0002xm-00 for ding@lists.math.uh.edu; Sat, 31 Dec 2005 04:48:31 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1EseHh-0006yp-LF for ding@lists.math.uh.edu; Sat, 31 Dec 2005 04:48:31 -0600 Original-Received: from smtp1.rz.uni-karlsruhe.de ([129.13.185.217]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EseHg-0007Km-00 for ; Sat, 31 Dec 2005 11:48:24 +0100 Original-Received: from rzstud1.stud.uni-karlsruhe.de (rzstud1.stud.uni-karlsruhe.de [193.196.41.33]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.43 #1) id 1EseHe-0005WS-LD; Sat, 31 Dec 2005 11:48:24 +0100 Original-Received: from uwi7 by rzstud1.stud.uni-karlsruhe.de with local (Exim 3.36 #1) id 1EseHk-0001ld-00 for ding@gnus.org; Sat, 31 Dec 2005 11:48:29 +0100 Original-To: ding@gnus.org Mail-Followup-To: ding@gnus.org, andreas+ding@gate450.dyndns.org X-PGP-Key: 0x2C006B340F8C8C1B X-Face: $:F<87a[gD1?#R6S3j21cr1&C&7bd63GHC.tSdskUb}hhwG(ci*=D5kJ<_N+p9q(7-,PnG. Et.Yh (Andreas Seltenreich's message of "Sat, 31 Dec 2005 10:42:56 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61615 Archived-At: --=-=-= Andreas Seltenreich writes: > attached is an attempt to get web groups working again with the new > google groups. Oops, I missed some html entity decoding and a debug statement. Attached is an updated patch. regards, Andreas --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=nnweb.patch Index: lisp/nnweb.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnweb.el,v retrieving revision 7.10 diff -c -r7.10 nnweb.el *** lisp/nnweb.el 7 Sep 2005 13:50:08 -0000 7.10 --- lisp/nnweb.el 31 Dec 2005 10:47:14 -0000 *************** *** 27,37 **** ;; Note: You need to have `w3' installed for some functions to work. ! ;; FIXME: Due to changes in the HTML output of Google Groups and Gmane, stuff ! ;; related to web groups (gnus-group-make-web-group) doesn't work anymore. ! ! ;; Fetching an article by MID (cf. gnus-refer-article-method) over Google ! ;; Groups should work. ;;; Code: --- 27,34 ---- ;; Note: You need to have `w3' installed for some functions to work. ! ;; FIXME: Due to changes in the HTML output of Gmane, stuff related to ! ;; web groups doesn't work anymore. ;;; Code: *************** *** 61,66 **** --- 58,64 ---- (defvar nnweb-type-definition '((google (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source") + (result . "http://groups.google.com/group/%s/msg/%s?dmode=source") (article . nnweb-google-wash-article) (reference . identity) (map . nnweb-google-create-mapping) *************** *** 337,342 **** --- 335,341 ---- (mm-url-decode-entities)))) (defun nnweb-google-parse-1 (&optional Message-ID) + "Parse search result in current buffer." (let ((i 0) (case-fold-search t) (active (cadr (assoc nnweb-group nnweb-group-alist))) *************** *** 349,358 **** ;; Go through all the article hits on this page. (goto-char (point-min)) (while (re-search-forward ! "a href=/groups\\(\\?[^ \">]*selm=\\([^ &\">]+\\)\\)" nil t) ! (setq mid (match-string 2) url (format ! (nnweb-definition 'id) mid)) (narrow-to-region (search-forward ">" nil t) (search-forward "" nil t)) (mm-url-remove-markup) --- 348,360 ---- ;; Go through all the article hits on this page. (goto-char (point-min)) (while (re-search-forward ! "a +href=\"/group/\\([^>\"]+\\)/browse_thread/[^>]+#\\([0-9a-f]+\\)" nil t) ! (setq Newsgroups (match-string-no-properties 1) ! ;; Note: with groups-ng, mid is no longer a common ! ;; Message-ID, but some internal id. ! mid (match-string-no-properties 2) url (format ! (nnweb-definition 'result) Newsgroups mid)) (narrow-to-region (search-forward ">" nil t) (search-forward "" nil t)) (mm-url-remove-markup) *************** *** 360,384 **** (setq Subject (buffer-string)) (goto-char (point-max)) (widen) ! (forward-line 2) ! (when (looking-at "
]+>") ! (goto-char (match-end 0))) ! (if (not (looking-at "]+>")) ! (skip-chars-forward " \t") ! (narrow-to-region (point) ! (search-forward "" nil t)) ! (mm-url-remove-markup) ! (mm-url-decode-entities) ! (setq Newsgroups (buffer-string)) ! (goto-char (point-max)) ! (widen) ! (skip-chars-forward "- \t")) (when (looking-at ! "\\([0-9]+\\)[/ ]\\([A-Za-z]+\\)[/ ]\\([0-9]+\\)[ \t]*by[ \t]*\\([^<]*\\) - ]+\\).*Next" nil t)) (>= i nnweb-max-hits)) (setq more nil) ;; Yup, there are more articles --- 418,424 ---- (goto-char (point-min)) (incf i 100) (if (or (not (re-search-forward ! "\"]+\\)\">= i nnweb-max-hits)) (setq more nil) ;; Yup, there are more articles *************** *** 443,449 **** ("hl" . "en") ("lr" . "") ("safe" . "off") ! ("sites" . "groups"))))) t) (defun nnweb-google-identity (url) --- 442,449 ---- ("hl" . "en") ("lr" . "") ("safe" . "off") ! ("sites" . "groups") ! ("filter" . "0"))))) t) (defun nnweb-google-identity (url) --=-=-=--