This project is born from 2 causes :
- Some websites do not implement RSS feed, or they are wrongly implemented.
- Website parsers exist but they are paid or freemium.
This project goal is : Allow anyone to benefit from a web-to-rss tool without needing to pay.
I choose to donate bandwidth and compute resource for the community, so that anyone can benefit from it. They cost money, not everyone can afford.
Help this project benefit everyone.
Everything you need to know is described here :
- Edit
sources.js
and add your website URL and parsing rules. - The script runs on my server every hour.
- You can add
www2rss.snwfdhmp.com/<sourceId>/rss.xml
to your RSS reader. I'm using miniflux myself.
- You are expected to be a developer, or get help from a developer. This is no auto-parser.
- If you don't want to use community servers, you may fork this repo and run it on your servers.
- Edit the
sources.js
file. I will review it and accept it ASAP.
Example:
{
id: "afis-editos", // this should be unique accross the whole file
url: "https://afis.org/-Editos-", // url of page to parse
method: "rawHttp", // set to 'runJavascript' if needed (ie. if website is not SSR)
parse: (html) => {
const $ = cheerio.load(html) // we use cheerio as default to build DOM
const items = []
$(".article-item").each((i, e) => { // iterate on items
const title = $(e).find("h3").text() // find required properties
const date = chrono.parseDate($(e).find("date")) // parse date: return RFC2822 format. Use chronoFR for FR parser, or add yours.
const url =
"https://afis.org/" + $(e).find("a").attr("href") // put url in absolute format: no relative format
const description = $(e).find("p").text()
const image = "https://afis.org/" + $(e).find("img").attr("src")
items.push({ title, date, url, description, image }) // most important line: data should contain {title,date,url,description,image}
})
return items
},
},
IMPORTANT:
- Test locally first to ensure minimum of back-and-forth. Clone, edit, run, verify .xml file and then open a pull request.
- Ensure
id
is unique for your source, otherwise things will break. - Add your source to the end of the sources.js.
- In case I'm really long to answer your PR, contact me on discord
mjo___
- Open a pull requests. No strict rules, just make your best.
- Donating helps a lot. GitHub Sponsors
- Leave a star ⭐️ so it can help more people.