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:
How it works
When a new entry from bbc.co.uk or bbc.com is added or updated, the extension:
- fetches the article page,
- reads the video details from the page’s
window.__INITIAL_DATA__JSON, - 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:
- News articles (
/news/articles/…): every clip BBC marks as embeddable, matched to its placeholder in page order. - Video pages (
/news/videos/…): the page’s own clip only, not the “Explore more” sidebar. - Portrait clips: shown phone-shaped and centred, while landscape clips are full width at 16:9.
Caveats
There are a few caveats:
- It relies on the structure of BBC’s page data, which may change without notice.
- BBC video pages flag their clips as not embeddable. The embed player currently plays them anyway, but BBC could start enforcing that.
- Some clips may be geo-restricted outside the UK.
- It makes one extra request to BBC for each new BBC entry.
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.