Skip to main content

py_epg is an easy to use, modular, multi-process EPG grabber written in Python.

Project description

py_epg

py_epg is an easy to use, modular, multi-process EPG grabber written in Python.

  • 📺 Scrapes various TV Program websites and saves programs in XMLTV format.
  • 🧩 Simply extend EpgScraper to grab EPG from your favorite TV site (requires basic Python skills).
  • 🤖 The framework provides the rest:
    • Beautiful Soup - easily search & extract data from html elements
    • multi-processing
    • config management
    • logging
    • build & write XMLTV (with auto-generated fields, eg 'stop')
    • proxy server support
    • auto http/s retries
    • random fake user_agents
  • 🚀 Save time by fetching channels in parallel (caution: use proxy server(s) to avoid getting blacklisted)!
  • 🧑🏻‍💻 Your contributions are welcome! Feel free to create a PR with your site scraper and/or framework improvement.

## Install
  1. Install poetry:

    curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
    
  2. Clone repository & install dependencies:

    git clone https://github.com/szab100/py_epg.git
    
  3. Configure py_epg.xml

    • Add all your channels as per the sample. Make sure you have a scraper implementation in py_epg/scrapers/ for each channels ('site' attribute).
  4. Run:

    cd py_epg
    poetry run epg -c py_epg.xml
    

Usage

$ poetry run epg -h
usage: epg [-h] [-p [PROGRESS_BAR]] [-q [QUIET]] -c CONFIG

A simple, multi-threaded, modular EPG grabber written in Python

optional arguments:
-h, --help            show this help message and exit
-p [PROGRESS_BAR], --progress-bar [PROGRESS_BAR]
                        Show a progress bar. Default: True
-q [QUIET], --quiet [QUIET]
                        Quiet mode (no progress-bar, etc). Default: False

required arguments:
-c CONFIG, --config CONFIG
                        Path to py_epg.xml file

License

Copyright 2021. Released under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_epg-0.2.3.tar.gz (11.9 kB view hashes)

Uploaded Source

Built Distribution

py_epg-0.2.3-py3-none-any.whl (14.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page