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

sb-heise.el patch



2005-08-07  David Hansen  <david.hansen@physik.fu-berlin.de>

	* shimbun/sb-heise.el (shimbun-heise-wash-telepolis-article):
          Remove ads.
--- cvs-src/emacs-w3m/shimbun/sb-heise.el	2005-07-07 15:02:25.000000000 +0200
+++ share/emacs/site-lisp/w3m/sb-heise.el	2005-08-07 09:21:07.000000000 +0200
@@ -192,7 +192,12 @@
     ;; strip nasty "download" images
     (goto-char (point-min))
     (while (re-search-forward "<TP\\(xBUT\\|:AD\\)>" nil t nil)
-      (delete-region (point) (re-search-forward "</TP\\(xBUT\\|:AD\\)>" nil t nil)))))
+      (delete-region (point) (re-search-forward "</TP\\(xBUT\\|:AD\\)>" nil t nil)))
+    (goto-char (point-min))
+    (while (re-search-forward "<!--OAS AD=\"Middle[0-9]*\"-->" nil t nil)
+      (let ((beg (search-backward "<table" nil t nil))
+            (end (search-forward "</table>" nil t nil)))
+        (when (and beg end) (delete-region beg end))))))
 
 (luna-define-method shimbun-make-contents
   :before ((shimbun shimbun-heise) header)