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.
-
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).
-
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 ...
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
Copyright 2021. Released under the MIT license.