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
-
Install package:
$ pip3 install py_epg
-
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.
-
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.
-
Install poetry:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
-
Clone repository & install dependencies:
git clone https://github.com/szab100/py-epg.git && cd py-epg
-
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).
-
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py_epg-0.6.1.tar.gz | 40.0 kB | Without provenance | Details for py_epg-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_epg-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for py_epg-0.6.1-py3-none-any.whl |
Total release size: 90.2 kB
Release files / py_epg-0.6.1.tar.gz
| Download URL | py_epg-0.6.1.tar.gz |
|---|---|
| Size | 40.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbcee089515f0e83ae15d641dcc825f0c70fe1330b3d5d6a2ba53d7e526e1475
|
|
BLAKE2b-256 checksum How to use checksums |
03f3ed82f655d1f07416452d517b86c2b2ef36748d2636de56545595eee3eb24
|
| 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.1-py3-none-any.whl
| Download URL | py_epg-0.6.1-py3-none-any.whl |
|---|---|
| Size | 50.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ff27f8cd4f122d3888abdddee4370965c7a661e53f8faa8695427af7fb1e321
|
|
BLAKE2b-256 checksum How to use checksums |
f0e8dfce77039a8a5c767b1655efa2c81a1d793db1cb27005b7b9eb78cefee11
|
| 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
|
Security for py-epg 0.6.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.