Git Product home page Git Product logo

feedparser's Introduction

Feed Parser

Parse your desired feeds and broadcast to whatever media you want.

How to use

Create and customize a config.json file to your likings and run the program.

Python version

pip install -r requirements.txt
python3 main.py

You can periodicly run this script on a remote server (cronjobs) and enjoy all the feeds being broadcasted to your desired media (e.g. telegram channel)

To run the script every morning on 7 AM:

crontab -e
* 7 * * * user cd path/to/main.py && python3 main.py

Sample config.json

{
    "telegram": {
        "bot_access_token": "XXX",
        "channel_id": "XXX",
        "proxy": {
            "enabled": false,
            "socks_proxy": "socks5://127.0.0.1:56789"
        }
    },
    "sources": {
        "Cloudflare": "https://blog.cloudflare.com/rss"
    },
    "feed": {
        "title_char_limit": 200,
        "summary_char_limit": 300,
        "since_days_before": 1,
        "wait_per_entry_seconds": 3,
        "wait_per_source_seconds": 5
    }
}

NOTICE: cronjob interval and since_days_before should logically match otherwise you're gonna get duplicate posts or you might miss a few.

Enjoy!

feedparser's People

Contributors

homayoonalimohammadi avatar

Stargazers

Mohammad Alavi avatar Amir Hosseini avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.