blog.thms.uk

A FreshRSS extension for BBC News videos

I read most of my news on FreshRSS. I follow several BBC News feeds, and use the built-in Content Retrieval to get the full text of all articles into my feed.

However, one thing is missing: videos. BBC News uses videos a fair bit, both within articles and as dedicated video content. Unfortunately, their pages build the video player in JavaScript, so a scraped article only contains an empty placeholder and a “To play this video you need to enable JavaScript in your browser” message.

So I have written a FreshRSS extension that swaps that placeholder for BBC’s own embeddable player:

xExtension-BbcVideo

How it works

When a new entry from bbc.co.uk or bbc.com is added or updated, the extension:

  1. fetches the article page,
  2. reads the video details from the page’s window.__INITIAL_DATA__ JSON,
  3. replaces each video placeholder in the entry with an iframe of BBC’s embed player (https://www.bbc.com/ws/av-embeds/articles/<asset>/<vpid>/en-GB/).

It handles:

Caveats

There are a few caveats:

Conclusion

It’s a small extension, but it fills the one gap that remained in reading BBC News through FreshRSS. If you want to use it, you can find installation and configuration details in the extension’s README.