💾 Archived View for gem.librehacker.com › gemlog › starlog › 20240131-0.gmi captured on 2024-08-25 at 01:03:43. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-02-05)
-=-=-=-=-=-=-
I want to view the Friends of Israel news feed regularly, but I also block JavaScript, and going to https://www.foi.org/news only gives me a blank page and buckets full of JavaScript I don't want to load.
I started combing through the JavaScript, trying to see if I could make JSON requests directly or something like that, to pull the news entries. But the solution is much simpler, thankfully. It turns out that the actual news entries are available in daily digests, which are available in plain HTML. Each day is available through a URL like so:
As you can see, it would not be too difficult to manually adjust the date each day. But of course, why do that, when you can run an Emacs function instead?
(defun open-foi-news-digest (&optional time) "Constructs the URL for today's Friends of Israel news digest and submits it to xdg-open." (interactive) (let ((time (if time time (current-time)))) (browse-url-xdg-open (format-time-string "https://www.foi.org/news/news-digest-%-m-%-d-%y/" time))))
So insert that into your init.el, and then M-x open-foi-news-digest will open today's feed. I use helm, so running that command is only a few keystrokes. But of course you could pick a shorter name or assign a keyboard shortcut.
This work © 2024 by Christopher Howard is licensed under Attribution-ShareAlike 4.0 International.