johnsu01 (johnsu01) wrote,
johnsu01
johnsu01

Stripping ads from NYT e-mails with Gnus

I wrote a couple years ago about stripping Yahoo banners from mailing list messages in Gnus. That bit is still in my configuration, and still working.

For reading the New York Times, I've recently switched away from RSS back to their headlines e-mail service. This is great, except they stick advertisements in the middle of the e-mails, and have a fair amount of boilerplate junk at the end. So I've added this to my ~/.gnus file:

(setq gnus-article-banner-alist
      '((nyt . "\\(^------------ ADVERTISEMENT -------------\\(.\\|
\\)*?----------------------------------------
\\)\\|\\(Get home delivery of The New York Times\\(.\\|
\\)*?----------------------------------------\\)
\\|\\(About This E-Mail\\(.\\|
\\)*\\)")))

The NYT mails get split into different groups. For each of those groups, I add (banner . nyt) to the group's parameters (accessible via G p on the group's name).

The result is a much more readable and ad-free e-mail.

Tags: emacs, gnus, new york times
Subscribe
  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments