Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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')
    • single proxy or rotating proxy pool support (with remote proxy-list fetching, per-request rotation, timeouts, retries and a circuit breaker that auto-disables failing proxies)
    • persistent caching (SQLite) of slow-changing data (channel logos, program details) with configurable TTLs
    • 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).
    • Optionally configure a <cache> (persistent caching with TTLs) and a <proxy-list> (rotating proxy pool with circuit breaker) - see the comments in the sample config for all supported attributes.
  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.

Metadata

Release files for py-epg 0.6.0b6

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

Source distribution (sdist)

Source distribution for py-epg 0.6.0b6
File Size Uploaded
py_epg-0.6.0b6.tar.gz 38.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-epg 0.6.0b6
File Interpreter ABI Platform
py_epg-0.6.0b6-py3-none-any.whl Python 3 none any Details

Total release size: 87.3 kB

Release files / py_epg-0.6.0b6.tar.gz

Download URL py_epg-0.6.0b6.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
22444dd59a7e3d902cbd9a63a67bd2210b987e34e7e5426f05a41129625c749c
BLAKE2b-256 checksum
How to use checksums
e6afabd07b624a7bbf1a644912b43450c71edcdfca09bc2625c3d287c92ea4e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.2 Darwin/25.6.0

Release files / py_epg-0.6.0b6-py3-none-any.whl

Download URL py_epg-0.6.0b6-py3-none-any.whl
Size 48.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c8a93e3cfc083943f8c1a89bb8620b7593ff13aef31cf6d1f0a224fb5674a84
BLAKE2b-256 checksum
How to use checksums
6f77cefae1ee71b1120e63137bbf78a566e5292a7df344693260891ac3aa647c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.2 Darwin/25.6.0

Release history Release notifications | RSS feed

0.6.0

2 release files

This release

0.6.0b6 This release

2 release files

0.5.0

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.3

2 release files

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