+ 1 group from date
+ (concat "<" (nnslashdot-sid-strip sid) "%1@slashdot>")
+ "" 0 lines nil nil))
+ headers))
+ (while (and (setq start (pop startats))
+ (< start last))
+ (setq point (goto-char (point-max)))
+ (nnweb-insert
+ (format nnslashdot-comments-url
+ (nnslashdot-sid-strip sid)
+ nnslashdot-threshold 0 start)
+ t)
+ (when first-comments
+ (setq first-comments nil)
+ (goto-char (point-max))
+ (while (re-search-backward "startat=\\([0-9]+\\)" nil t)
+ (setq s (string-to-number (match-string 1)))
+ (unless (memq s startats)
+ (push s startats)))
+ (setq startats (sort startats '<)))
+ (goto-char point)
+ (while (re-search-forward
+ "<a name=\"\\([0-9]+\\)\"><\\(b\\|H4\\)>\\([^<]+\\)</\\(b\\|H4\\)>.*score:\\([^)]+\\))"
+ nil t)
+ (setq article (string-to-number (match-string 1))
+ subject (match-string 3)
+ score (match-string 5))
+ (when (string-match "^Re: *" subject)
+ (setq subject (concat "Re: " (substring subject (match-end 0)))))
+ (setq subject (nnweb-decode-entities-string subject))
+ (forward-line 1)
+ (if (looking-at
+ "by <a[^>]+>\\([^<]+\\)</a>[ \t\n]*.*(\\([^)]+\\))")
+ (progn
+ (goto-char (- (match-end 0) 5))
+ (setq from (concat
+ (nnweb-decode-entities-string (match-string 1))
+ " <" (match-string 2) ">")))
+ (setq from "")
+ (when (looking-at "by \\(.+\\) on ")
+ (goto-char (- (match-end 0) 5))
+ (setq from (nnweb-decode-entities-string (match-string 1)))))
+ (search-forward " on ")
+ (setq date
+ (nnslashdot-date-to-date
+ (buffer-substring (point) (progn (end-of-line) (point)))))
+ (setq lines (/ (abs (- (search-forward "<td ")
+ (search-forward "</td>")))
+ 70))
+ (forward-line 4)
+ (setq parent
+ (if (looking-at ".*cid=\\([0-9]+\\)")
+ (match-string 1)
+ nil))
+ (setq did t)
+ (push
+ (cons
+ (1+ article)
+ (make-full-mail-header
+ (1+ article)
+ (concat subject " (" score ")")
+ from date
+ (concat "<" (nnslashdot-sid-strip sid) "%"
+ (number-to-string (1+ article))
+ "@slashdot>")
+ (if parent
+ (concat "<" (nnslashdot-sid-strip sid) "%"
+ (number-to-string (1+ (string-to-number parent)))
+ "@slashdot>")
+ "")
+ 0 lines nil nil))
+ headers)))))
+ (setq nnslashdot-headers (sort headers 'car-less-than-car))