[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sb-heise.el update
- From: Andreas Seltenreich <seltenreich@xxxxxx>
- Date: Wed, 08 Dec 2004 01:32:22 +0100
- X-ml-name: emacs-w3m
- X-mail-count: 07238
- References: <87y8gln9mu.fsf@robotron.ath.cx>
David Hansen writes:
> i made some changes to sb-heise.el to support their new 'design'
> on http://www.heise.de/tp/
Looks like one of the regexps is still causing trouble:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (args-out-of-range "http://www.heise.de/tp/r4/magazin/lit/18970/1.html" 10279 10360)
match-string(0 "http://www.heise.de/tp/r4/magazin/lit/18970/1.html")
(concat "<telepolis" (match-string 0 url) "@heise.de>")
(setq id (concat "<telepolis" (match-string 0 url) "@heise.de>"))
(let ((author ...) (date ...) (id)) (setq url (w3m-expand-url url shimbun-heise-url)) (string-match "/[0-9]+/[0-9]+/" url) (setq id (concat "<telepolis" ... "@heise.de>")) (when (shimbun-search-id shimbun id) (throw ... nil)) (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" date) (push (shimbun-create-header 0 subject author ... id "" 0 0 url) headers))
(progn (let (... ... ...) (setq url ...) (string-match "/[0-9]+/[0-9]+/" url) (setq id ...) (when ... ...) (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" date) (push ... headers)))
(if (re-search-forward sb-heise-tp-auth-date-re nil t nil) (progn (let ... ... ... ... ... ... ...)))
(when (re-search-forward sb-heise-tp-auth-date-re nil t nil) (let (... ... ...) (setq url ...) (string-match "/[0-9]+/[0-9]+/" url) (setq id ...) (when ... ...) (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" date) (push ... headers)))
(let ((url ...) (subject ...)) (when (re-search-forward sb-heise-tp-auth-date-re nil t nil) (let ... ... ... ... ... ... ...)))
(while (re-search-forward sb-heise-tp-url-re nil t nil) (let (... ...) (when ... ...)))
(catch (quote stop) (while (re-search-forward sb-heise-tp-url-re nil t nil) (let ... ...)))
(let (headers) (catch (quote stop) (while ... ...)) headers)
shimbun-heise-get-telepolis-headers([shimbun-heise [0 0 0 0 0 0 0] [shimbun-gnus-mua [0 0 0 0 0 0 0] #0] "heise" "telepolis" ("news" "telepolis") nil (("default" . "X-Face: #RVD(kjrS;RY\"2yH]w.1U,ZC_DbR,9{tQnhyYe|,\\J)\"C*o1{%`*]WwtAuo;reeq_koTr=oIKXFB4#bS'tSdz.Mc%t~-@873uYV>SMjL7D6K$M4L0Up{D_rBgD*Xj,t;iPKWh:!B}ijDOoCxs!}rs&(r-TLwU8=>@[w^H(>^u$wM*}\":9LANQs)1\"cZP6ftp?9>b&|rkGR+VWIlD:%?,Fvi8h?q2H+pVqq5#Z9*k2q7.P)0$x!A)T")) "http://www.heise.de" nil nil "\\(<!-- Meldung -->\\|<!-- INHALT -->\\|<HEISETEXT>\\)" "\\(<!-- untere News-Navigation -->\\|<!-- INHALT -->\\|</HEISETEXT>\\)" nil nil])
--8<---------------cut here---------------end--------------->8---
I hope it is ok that the attached diff is not against CVS HEAD since
cvs won't let me connect at the moment:
cvs [diff aborted]: connect to cvs.namazu.org(61.215.208.42):2401 failed: Connection refused
--8<---------------cut here---------------start------------->8---
*** sb-heise.el 2004-12-08 01:11:48.000000000 +0100
--- /home/andreas/backup/emacs/!home!andreas!src!elisp!sb-heise.el.~3~ 2004-12-07 15:22:43.000000000 +0100
***************
*** 101,107 ****
(let ((author (concat (match-string 1) " <invalid@heise.de>"))
(date (match-string 2)) (id))
(setq url (w3m-expand-url url shimbun-heise-url))
! (string-match "/\\w+/[0-9]+/" url)
(setq id (concat "<telepolis" (match-string 0 url) "@heise.de>"))
(when (shimbun-search-id shimbun id)
(throw 'stop nil))
--- 101,107 ----
(let ((author (concat (match-string 1) " <invalid@heise.de>"))
(date (match-string 2)) (id))
(setq url (w3m-expand-url url shimbun-heise-url))
! (string-match "/[0-9]+/[0-9]+/" url)
(setq id (concat "<telepolis" (match-string 0 url) "@heise.de>"))
(when (shimbun-search-id shimbun id)
(throw 'stop nil))
--8<---------------cut here---------------end--------------->8---
And the obligatory ChangeLog Entry...
* shimbun/sb-heise.el (shimbun-heise-get-telepolis-headers): Relax
message id regexp
regards
Andreas