Add elfeed-paywall-rdrview-extra-args
Bumped version to 1.0.1
Correct deref function name
Three bug-bears when using RSS feeds with Elfeed are:
This package solves these three problems:
NB: Before you use elfeed-paywall, you'll need rdrview in your
$PATH
.
;; Add the `paywall' tag to a feed
(setq elfeed-feeds
'(("https://www.theregister.com/headlines.atom" tech paywall)))
(straight-use-package
'(elfeed-paywall :type git :repo "https://git.sr.ht/~johnhamelink/elfeed-paywall"))
(require 'elfeed-paywall)
(defun my-elfeed-transform-entry (entry)
"Transformation logic for ENTRYs."
(elfeed-paywall-with-tag
entry 'paywall
(lambda ()
(elfeed-log 'info "Processing Entry %s" (elfeed-deref (elfeed-entry-title entry)))
;; Remove the analytics URL forwarder that is put in front of
;; "The Register" articles
(elfeed-paywall-replace-regexp-in-link
entry "go.theregister.com/feed/" "")
;; Prefix the link for use with https://12ft.io (A direct
;; URL, no JS required)
(elfeed-paywall-add-paywall-proxy entry)
;; Visit the entry link, bypass the paywall, and extract the
;; content from the page, then replace the content in the
;; entry with it
(elfeed-paywall-extract-from-url entry))
;; Delete the tag after running the lambda
t))
(add-hook 'elfeed-new-entry-hook #'my-elfeed-transform-entry)
elfeed-paywall-rdrview-user-agent
The User-Agent String that is passed to `elfeed-paywall-rdr-executable`. The default value is taken from declutter.el.
elfeed-paywall-rdrview-path
The executable path for rdrview.
;; Add the `paywall' tag to a feed
(setq elfeed-feeds
'(("https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g" emacs video)
("https://www.theregister.com/headlines.atom" tech paywall)))
(straight-use-package
'(elfeed-paywall :type git :repo "https://git.sr.ht/~johnhamelink/elfeed-paywall"))
(require 'elfeed-paywall)
(defun my-elfeed-transform-entry (entry)
(elfeed-paywall-with-tag
entry 'paywall
(lambda ()
(elfeed-log 'info "Thwarting Paywall: %s" (entry-deref (elfeed-entry-title entry)))
;; Remove the analytics URL forwarder that is put in front of
;; "The Register" articles
(elfeed-paywall-replace-regexp-in-link
entry "go.theregister.com/feed/" "")
;; Prefix the link for use with https://12ft.io (A direct
;; URL, no JS required)
(elfeed-paywall-add-paywall-proxy entry)
(elfeed-log 'debug "Entry Link is now: %s" (elfeed-deref (elfeed-entry-link entry)))
;; Visit the entry link, bypass the paywall, and extract the
;; content from the page, then replace the content in the
;; entry
(elfeed-paywall-extract-from-url entry))
;; Delete the tag after running the lambda
t)
;; Replace Youtube links with their Invidious counterparts.
;; This is desirable for privacy and to avoid ads.
;; See: https://invidious.io/
(elfeed-paywall-with-tag
entry 'video
(lambda ()
(elfeed-log 'info "YouTube -> Invidious: %s" (entry-deref (elfeed-entry-title entry)))
(elfeed-paywall-replace-regexp-in-link
entry "[w\\.]*youtube\\.com" "yt.artemislena.eu"))))
(add-hook 'elfeed-new-entry-hook #'my-elfeed-transform-entry)
This project wouldn't have existed without the following projects: