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

nnshimbun problem with nytimes.com



Hi,

I tried accessing the nytimes op-ed articles with my own nnshimbun
configuration, but it doesn't display any articles.  I get the summary
buffer with the articles, but when I try to view an article, I get the
following error:

  Wrong type argument: stringp, nil

To access the nytimes articles I did the following:

* in .gnus:

  (require 'nnshimbun)
  (setq shimbun-additional-servers-list '("nytimes"))

* in sb-nytimes.el:

  (require 'shimbun)
  (luna-define-class shimbun-nytimes (shimbun) ())

  (defvar shimbun-nytimes-url "http://www.nytimes.com/pages/opinion/columns/";)

  (luna-define-method shimbun-index-url ((shimbun shimbun-nytimes))
    shimbun-nytimes-url)

  (defvar shimbun-nytimes-groups '("nytimes.columns"))

  (luna-define-method shimbun-get-headers ((shimbun shimbun-nytimes) &optional range)
    (let* ((regexp "<BR><P><FONT ?[^>]*>\\([^<]+\\)</FONT><BR><A href=\"\\([^\"]+\\)\">\n.*\n *<STRONG>\\([^>]*\\)</STRONG>.*\n *By \\([^<]*\\)</FONT><BR>")
           subject from date id url headers)
      (catch 'stop
        (while (re-search-forward regexp nil t nil)
          (setq date (match-string 1))
          (setq url (match-string 2))
          (setq subject (match-string 3))
          (setq from (capitalize (match-string 4)))
          (setq id url)
          (when (shimbun-search-id shimbun id)
            (throw 'stop nil))
          (push (shimbun-make-header 0
                                     (shimbun-mime-encode-string subject)
                                     (shimbun-mime-encode-string from)
                                     date id "" 0 0 url)
                headers)))
      headers))

  (provide 'sb-nytimes)

Thanks in advance for help with this,
Boris

-- 
boris@uncommon-sense.net - <http://www.uncommon-sense.net/>

Force has no place where there is need of skill.
		-- Herodotus