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

sb-laut-de fixes (was: Re: windows-1252)



Katsumi Yamaoka writes:

> make sb-laut-de.el work.  It works now, however I feel there are
> many garbage in shimbun articles especially in the laut-de.news
> group.  I cannot discriminate between significant ones and
> others since I don't read German, though.  Could anyone look
> into it?

Sorry, I was reading only some of the review streams, so I didn't
notice the horrible condition of the "news" stream. I also reduced the
amount of useless images in the other feeds. Patch attached.

regards,
Andreas

Changes:
* sb-laut-de.el: (shimbun-laut-de-content-start): also match on group "news"
  (shimbun-headers): remove stub code
  (shimbun-clear-contents): added
Index: sb-laut-de.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/shimbun/sb-laut-de.el,v
retrieving revision 1.1
diff -c -r1.1 sb-laut-de.el
*** sb-laut-de.el	10 Oct 2004 23:14:32 -0000	1.1
--- sb-laut-de.el	7 Apr 2005 12:40:35 -0000
***************
*** 1,6 ****
  ;;; sb-laut-de.el --- shimbun backend for <http://www.laut.de/>
  
! ;; Copyright (C) 2004 Andreas Seltenreich <seltenreich@gmx.de>
  
  ;; Author: Andreas Seltenreich <seltenreich@gmx.de>
  ;; Keywords: news
--- 1,6 ----
  ;;; sb-laut-de.el --- shimbun backend for <http://www.laut.de/>
  
! ;; Copyright (C) 2004, 2005 Andreas Seltenreich <seltenreich@gmx.de>
  
  ;; Author: Andreas Seltenreich <seltenreich@gmx.de>
  ;; Keywords: news
***************
*** 29,47 ****
  (luna-define-class shimbun-laut-de (shimbun-rss) ())
  
  (defvar shimbun-laut-de-groups
!   '("platten"
!     "news"
!     "platten_rock"
!     "platten_pop"
      "platten_alternative"
-     "platten_metal"
-     "platten_rnb"
      "platten_dance"
      "platten_jazz"
!     "platten_hiphop"))
  
  (defvar shimbun-laut-de-content-start
!   "<!-- headline -->\\|<span class=\"ueberschriftnormalgrau[^>]*>")
  
  (defvar shimbun-laut-de-content-end
    (concat "<!-- /box weitere Links -->\\|"
--- 29,50 ----
  (luna-define-class shimbun-laut-de (shimbun-rss) ())
  
  (defvar shimbun-laut-de-groups
!   '("news"
!     "platten"
      "platten_alternative"
      "platten_dance"
+     "platten_hiphop"
      "platten_jazz"
!     "platten_metal"
!     "platten_pop"
!     "platten_rnb"
!     "platten_rock"))
  
  (defvar shimbun-laut-de-content-start
!   (concat
!    "<!-- headline -->\\|"
!    "<span class=\"ueberschriftnormalgrau[^>]*>\\|"
!    "<span class=\"inhaltsueberschrift\">"))
  
  (defvar shimbun-laut-de-content-end
    (concat "<!-- /box weitere Links -->\\|"
***************
*** 50,59 ****
  
  (defvar shimbun-laut-de-from-address "redaktion@laut.de")
  
- (luna-define-method shimbun-headers :before ((shimbun shimbun-laut-de)
- 					     &rest range)
-   shimbun)
- 
  (luna-define-method shimbun-groups ((shimbun shimbun-laut-de))
    shimbun-laut-de-groups)
  
--- 53,58 ----
***************
*** 69,74 ****
--- 68,83 ----
  (luna-define-method shimbun-index-url ((shimbun shimbun-laut-de))
    (concat "http://www.laut.de/partner/allgemein/"
  	  (shimbun-current-group-internal shimbun) ".rdf"))
+ 
+ (luna-define-method shimbun-clear-contents :after ((shimbun shimbun-laut-de)
+ 						     header)
+   (shimbun-remove-tags "<script" "</script>")
+   (shimbun-remove-tags
+    "<img src=\"/images/\\(?:voting\\|leer\\)[^\"]+gif" ">")
+   (shimbun-remove-tags
+    "<img[^>]+\\(?:width=\"1\"\\|height=\"1\"\\)[^>]*>")
+   (shimbun-remove-tags
+    "<a href=\"[^\"]+lautshop_preisvergleich_detail.php" "</a>"))
  
  (provide 'sb-laut-de)