https://github.com/davorg/drwho-newsfeed
Make a web feed from the BBC Doctor Who news site
https://github.com/davorg/drwho-newsfeed
Last synced: 10 months ago
JSON representation
Make a web feed from the BBC Doctor Who news site
- Host: GitHub
- URL: https://github.com/davorg/drwho-newsfeed
- Owner: davorg
- Created: 2021-10-13T07:45:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-08-12T06:44:39.000Z (10 months ago)
- Last Synced: 2025-08-12T22:47:40.179Z (10 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Doctor Who Newsfeed RSS Generator
(Insert rant about the death of web feeds)
This script fetches the latest articles fromi
[doctorwho.tv/news-and-features](https://www.doctorwho.tv/news-and-features)
and generates an RSS feed (`doctorwho.xml`) using Puppeteer.
## Requirements
- Node.js 18+ (tested with Node.js 20.19.3)
- npm
## Setup
1️⃣ Clone this repo or place the script (`doctorwho_feed.mjs`) in a folder.
2️⃣ Install dependencies:
```bash
npm install puppeteer feed
```
This will create `node_modules` and `package-lock.json`.
## Usage
Run the script:
```bash
node doctorwho_feed.mjs
```
On success, it will generate:
```
✔ Feed written to doctorwho.xml with X items and real dates.
```
and create:
```
docs/doctorwho.xml
```
which contains the RSS feed.
## Debugging
- To see the browser window (for debugging), edit `doctorwho_feed.mjs`:
```js
const browser = await puppeteer.launch({
headless: false,
args: ['--no-sandbox', '--disable-setuid-sandbox']
});
```
- Add extra `console.log()` lines in the script to trace progress.
## Notes
- If running on Linux/macOS and you hit permissions issues, try:
```bash
sudo node doctorwho_feed.mjs
```
- If you see a `TimeoutError: Waiting for selector`, check if the website structure has changed (e.g., update your selectors).