Skip to main content

# RSSFilter - Fetch, Parse, Filter and Re-Feed RSS by Cathal Garvey, Copyright 2015, licensed under the [GNU Affero GPL](https://gnu.org/licenses/agpl.txt).

## What it does RSSFilter lets you take an RSS feed, apply regex queries (or custom-defined functions) to the feed, and then present the result as a new RSS feed ready for consumption by a feed reader. It has an entry point for terminal usage, and is well suited (indeed, developed for) for integration in a simple web-app relay.

## Why I wrote it I’m mulling the problem of mass-data-funnelling a lot lately and this is just one experiment as part of a much broader thing. Specifically this was inspired by the annoying discovery of a news website that provided an RSS feed for all news but not for topic-specific news. Thankfully, the topics had appropriate URL paths, so the science news could be filtered by selecting articles containing “/science/” in them. So was born RSSFilter.

## Usage Install: sudo pip install rssfilter (or sudo python3 setup.py install)

Installation gives you the rssfilter module, and also the rssfilter terminal tool.

Included in the git repo is a trivial example usage for a Flask webapp, but this is not installed with rssfilter when pip-installed or similar.

As currently written the entry-points accept up to two filters which may contain arbitrary regex expressions. As there are only two built-in filter-classes this two-filter limit isn’t really a limit at all. There is an option whether to combine the given two filters by boolean AND or OR.

In module usage you can define your own filters; they should accept a feed in a format as returned by feedparser (but with all elements converted to native types!) and return one in the same format.

## Example Terminal Usage:

Fetching recent articles on the Marriage Equality referendum in Ireland (May 2015) from the Irish Times RSS feed:

rssfilter https://www.irishtimes.com/cmlink/the-irish-times-news-1.1319192 -t ‘([Gg]ay|[Hh]omosexual|[Mm]arriage|[Rr]eferend)’

(Use ‘rssfilter –help’ for more information)

Importing and using the module to achieve the same result:

import rssfilter it_feed = “https://www.irishtimes.com/cmlink/the-irish-times-news-1.1319192” f = rssfilter.filter_feed(it_feed, rssfilter.in_title_filter(‘([Gg]ay|[Hh]omosexual|[Mm]arriage|[Rr]eferend)’)) print(f)

To learn more, read the source code docstrings or use iPython to explore with the “?” appellation.

Metadata

Release files for rssfilter 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rssfilter 0.0.1
File Size Uploaded Provenance Actions
rssfilter-0.0.1.tar.gz 5.3 kB Without provenance Details for rssfilter-0.0.1.tar.gz

Release files / rssfilter-0.0.1.tar.gz

Download URL rssfilter-0.0.1.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
43a44d259a8b9534deacf00c173c47bb3a55be3fea5e04a628c5b44f81d4a6ad
BLAKE2b-256 checksum
How to use checksums
c607ffbbfa3d0d4ec6f4fd64dfe55b6d7d2dc72ccb9b1c90fe78e8f8ed9900e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for rssfilter 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page