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 tv-site scraper and/or framework improvements.

Usage

  1. Install package:

    $ pip3 install py_epg
    
  2. Create configuration: py_epg.xml

    • Add all your channels (see sample config).
    • Make sure there is a corresponding site scraper implementation in py_epg/scrapers for each channels ('site' attribute).
  3. Run:

    $ python3 -m py_epg -c </path/to/your/py_epg.xml> -p
    

    ..or see all supported flags:

    $ python3 -m py_epg -h
    usage: py_epg [-h] [-p [PROGRESS_BAR]] [-q [QUIET]] -c CONFIG
    ...
    

Development

Your contributions are welcome! Setup your dev environment as described below. VSCode is a great free IDE for python projects. Once you are ready with your cool tv site scraper or framework feature, feel free to open a Pull Request here.

  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 && cd py-epg
    
  3. Configure py_epg.xml

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

    poetry install
    poetry run epg -c py_epg.xml
    

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.3.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_epg-0.3.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file py-epg-0.3.0.tar.gz.

File metadata

  • Download URL: py-epg-0.3.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.2 Linux/5.10.0-17-amd64

File hashes

Hashes for py-epg-0.3.0.tar.gz
Algorithm Hash digest
SHA256 931fb97409197799740bca7e3a33dc26662ab84ccb0776b984e01e982724aaa3
MD5 461f21c6c3913f1fb1e95886093caa82
BLAKE2b-256 90e8aad8cb0845934dec2fb142e773880a33069202df0e731286cf0f5a20ffe1

See more details on using hashes here.

File details

Details for the file py_epg-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: py_epg-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.2 Linux/5.10.0-17-amd64

File hashes

Hashes for py_epg-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a0694568ee05cf2c7065e4c8a39f5f4d9b2ce5c66793310ac4ee9d10e459138
MD5 3341d56de56c151af2da67ca275d0149
BLAKE2b-256 83217b07f258f5f52a1abf595b50e922531a27f3a9f963ed19aa7079058970d9

See more details on using hashes here.

Supported by

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