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

shimbun sb-zeit-de.el updates



Hi,

zeit.de recently changed their design in a way that long articles are
spread to multiple pages. This is quite annoying when reading them
offline via Gnus' agent mode, and you only have the first half or less
of an article. The attached patch fixes it by appending "?page=all" to
the URLs from the rss feed.

regards,
Andreas

--8<---------------cut here---------------start------------->8---
2005-06-26  Andreas Seltenreich  <seltenreich@gmx.de>

	* shimbun/sb-zeit-de.el (shimbun-get-headers): Append
          "?page=all" to the URLs to get complete articles again.
--8<---------------cut here---------------end--------------->8---
Index: shimbun/sb-zeit-de.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/shimbun/sb-zeit-de.el,v
retrieving revision 1.5
diff -c -r1.5 sb-zeit-de.el
*** shimbun/sb-zeit-de.el	1 Jun 2005 10:00:14 -0000	1.5
--- shimbun/sb-zeit-de.el	26 Jun 2005 16:44:47 -0000
***************
*** 46,51 ****
--- 46,60 ----
  (luna-define-method shimbun-groups ((shimbun shimbun-zeit-de))
    shimbun-zeit-de-groups)
  
+ (luna-define-method shimbun-get-headers :around ((shimbun shimbun-zeit-de)
+ 						 &optional range)
+   (mapcar
+    (lambda (header)
+      (let ((url (shimbun-header-xref header)))
+        (when (string-match "^http://www\\.zeit\\.de" url)
+ 	 (shimbun-header-set-xref header (concat url "?page=all"))) header))
+   (luna-call-next-method)))
+ 
  (luna-define-method shimbun-rss-build-message-id
    ((shimbun shimbun-zeit-de) url date)
    (if (string-match "http://\\([^/]+\\)\\(/\\(.+\\)\\)?" url)