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

Re: [shimbun] ZDNet



>>>>> In [emacs-w3m : No.03401] 
>>>>>	野宮 賢 / NOMIYA Masaru <nomiya@ttmy.ne.jp> wrote:

野宮> ZDNetが読めなくなって久しいのですが、お手隙の折にでも手を入れて戴けれ
野宮> ば幸いです........<(_ _)>

しばらく前に対応させたのですが、ちゃんと動作確認できていません(^^;
Index: sb-zdnet.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/shimbun/sb-zdnet.el,v
retrieving revision 1.15
diff -u -r1.15 sb-zdnet.el
--- sb-zdnet.el	2002/03/24 03:30:02	1.15
+++ sb-zdnet.el	2002/05/20 12:43:39
@@ -36,7 +36,7 @@
 (defvar shimbun-zdnet-url "http://www.zdnet.co.jp/";)
 
 (defvar shimbun-zdnet-group-url-alist
-  '(("comp" . "news")
+  '(("comp" . "news/past")
     ("gamespot" . "gamespot")))
 
 (defvar shimbun-zdnet-groups (mapcar 'car shimbun-zdnet-group-url-alist))
@@ -64,18 +64,18 @@
 	(delete-region start (point))))
     (goto-char (point-min))
     (while (re-search-forward
-	    "<a href=\"\\(/news/\\)?\\(\\([0-9][0-9]\\)\\([0-9][0-9]\\)/\\([0-9][0-9]\\)/\\([^\\.]+\\).html\\)\"><font size=\"4\"><strong>"
+	    "<a href=\"\\(/news/\\([0-9][0-9]\\)\\([0-9][0-9]\\)/\\([0-9][0-9]\\)/\\([^\\.]+\\).html\\)\">"
 	    nil t)
-      (let ((year  (+ 2000 (string-to-number (match-string 3))))
-	    (month (string-to-number (match-string 4)))
-	    (day   (string-to-number (match-string 5)))
+      (let ((year  (+ 2000 (string-to-number (match-string 2))))
+	    (month (string-to-number (match-string 3)))
+	    (day   (string-to-number (match-string 4)))
 	    (id    (format "<%s%s%s%s%%%s>"
+			   (match-string 2)
 			   (match-string 3)
 			   (match-string 4)
 			   (match-string 5)
-			   (match-string 6)
 			   (shimbun-current-group-internal shimbun)))
-	    (url (match-string 2)))
+	    (url (match-string 1)))
 	(push (shimbun-make-header
 	       0
 	       (shimbun-mime-encode-string
@@ -84,13 +84,13 @@
 			    (buffer-substring
 			     (match-end 0)
 			     (progn (search-forward "</a>" nil t) (point)))
-			    "<[^>]+>")
+			    "\\(<[^>]+>\\|\r\\)")
 			   ""))
 	       (shimbun-from-address-internal shimbun)
 	       (shimbun-make-date-string year month day)
-	       id  "" 0 0 (concat (shimbun-index-url shimbun) url))
+	       id  "" 0 0 (shimbun-expand-url url (shimbun-index-url shimbun)))
 	      headers)))
-    (nreverse headers)))
+    headers))
 
 (defun shimbun-zdnet-gamespot-get-headers (shimbun)
   (let ((case-fold-search t) headers
確認が取れたら commit します。

-- 
有沢 明宏