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

Patch for sb-heise.el

Please find attached a small patch for sb-heise.el which is adapted to
the new URL scheme on http://www.heise.de/newsticker. By the way, I
recently skimmed through the different shimbuns in CVS and noticed that
there are several which do not work since the URLs are no longer valid,
e.g. sb-wiki, sb-bbdb-ml, sb-elips, sb-dennou, sb-digiko,
sb-f1fan. Maybe some of those URLs can be updated (most of them are
Japanese so I wouldn't know... :-) ).

--- sb-heise.el	2008-03-20 14:21:10.000000000 +0100
+++ sb-heise-new.el	2008-03-20 14:20:08.000000000 +0100
@@ -59,15 +59,16 @@
 (defun shimbun-heise-get-newsticker-headers (shimbun)
-  (let ((regexp "<a href=\"meldung/\\([0-9]+\\)\">\\([^<]+\\)</a>")
+  (let ((regexp "<a href=\"/newsticker/\\(.*\\)/meldung/\\([0-9]+\\)\">\\([^<]+\\)</a>")
 	(from "Heise Online News <invalid@xxxxxxxx>")
-	(date "") (id) (url) (subject) (headers))
+	(date "") (longurl) (id) (url) (subject) (headers))
     (catch 'stop
       (while (re-search-forward regexp nil t nil)
-	(setq id (match-string 1))
-	(setq url (shimbun-expand-url (concat "meldung/" id)
+	(setq longurl (match-string 1))
+	(setq id (match-string 2))
+	(setq url (shimbun-expand-url (concat longurl "/meldung/" id)
 				      (shimbun-index-url shimbun)))
-	(setq subject (match-string 2))
+	(setq subject (match-string 3))
 	(setq id (concat "<newsticker" id "@heise.de>"))
 	(when (shimbun-search-id shimbun id)
 	  (throw 'stop nil))