Skip to main content

TV Guide Grabber for North America

Project description

gracenote2epg - TV Guide Grabber for North America

📦 PyPI Status: Now available on PyPI! Install with pip install gracenote2epg[full]

A modern Python implementation for downloading TV guide data from tvlistings.gracenote.com with intelligent caching and TVheadend integration.

Python 3.7+ License: GPL v3 PyPI GitHub

🌟 Key Features

🆕 = new in 2.0

  • 📺 XMLTV standard - full DTD compliance for broad player/PVR compatibility
  • Adaptive parallel downloads 🆕 - self-tuning concurrency that rides the server's rate-limit wall
  • 🎬 Rich metadata 🆕 - cast & crew credits, box-art icons, typed images, per-episode synopsis
  • 🌍 Built-in geocoding 🆕 - postal/ZIP → lineup, no pandas/numpy
  • 🧠 Intelligent caching - 95%+ reuse, organized into guide/, series/, movies/
  • 🗣️ Multi-language - French/English/Spanish detection and translations
  • 📡 TVheadend integration - channel filtering and matching
  • ♻️ Unified retention - guide cache, logs, XMLTV and config backups
  • 🧩 Platform agnostic - Raspberry Pi, Synology NAS, and Linux

🚀 Installation

# Recommended: Install with all features
pip install gracenote2epg[full]

# Basic installation (core features only)
pip install gracenote2epg

# Alternative: Install from GitHub
pip install "gracenote2epg[full] @ git+https://github.com/th0ma7/gracenote2epg.git@v2.0.0"

📦 Development Installation

# Install from GitHub (latest)
pip install "gracenote2epg[dev] @ git+https://github.com/th0ma7/gracenote2epg.git"

# Clone and install for development
git clone https://github.com/th0ma7/gracenote2epg.git
cd gracenote2epg
pip install -e .[dev]

📋 System Requirements

  • Python: 3.7 or higher
  • Required: requests>=2.25.0
  • Optional: langdetect>=1.0.9 (language detection), polib>=1.1.0 (translations)

🛠️ Quick Examples

Command Line Examples

# Show capabilities (XMLTV standard)
tv_grab_gracenote2epg --capabilities

# Download 7 days of guide data
tv_grab_gracenote2epg --days 7 --zip 92101

# Test lineup detection
tv_grab_gracenote2epg --show-lineup --zip 92101

# Canadian postal code with console output
tv_grab_gracenote2epg --days 3 --postal J3B1M4 --console

# Save to custom file with debug info
tv_grab_gracenote2epg --days 7 --zip 92101 --output guide.xml --debug

# Use specific lineup (auto-extracts location)
tv_grab_gracenote2epg --days 7 --lineupid CAN-OTAJ3B1M4

# Disable language detection
tv_grab_gracenote2epg --days 7 --zip 92101 --langdetect false

Configuration

💡 TVheadend Users - Easy Setup: Most users don't need to edit configuration files! Simply use TVheadend's Extra arguments box to add your parameters like --days 7 --zip 92101 --langdetect false (Configuration → Channel/EPG → EPG Grabber Modules). See TVheadend Integration Guide for details.

TVheadend Integration Examples

# In TVheadend Extra arguments box:
--days 7 --zip 92101
--days 14 --postal J3B1M4 --langdetect false  
--days 7 --zip 90210 --lineupid auto

Important: Extra arguments override the default configuration file, so you typically don't need to edit conf/gracenote2epg.xml manually.

Option 2: Edit Configuration File (Advanced Users)

Also note that the gracenote2epg auto-creates a configuration file on first run. You can then modify as needed:

<?xml version="1.0" encoding="utf-8"?>
<settings version="5">
  <setting id="zipcode">92101</setting>        <!-- Your ZIP/postal code -->
  <setting id="lineupid">auto</setting>        <!-- Auto-detect lineup -->
  <setting id="days">7</setting>               <!-- Guide duration -->
</settings>

📚 Documentation

🛣️ Development & Roadmap

Advanced Topics

🆘 Need Help?

  1. Check the troubleshooting guide
  2. Test your lineup: tv_grab_gracenote2epg --show-lineup --zip YOUR_CODE
  3. Enable debug logging: tv_grab_gracenote2epg --debug --console
  4. Create an issue with logs

📄 License

GPL v3 - Same as original script.module.zap2epg project

🙏 Credits

Based on edit4ever's script.module.zap2epg with enhancements and modern Python architecture.


View Changelog | Report Issues | Contribute

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

gracenote2epg-2.0.0.tar.gz (516.7 kB view details)

Uploaded Source

Built Distribution

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

gracenote2epg-2.0.0-py3-none-any.whl (549.4 kB view details)

Uploaded Python 3

File details

Details for the file gracenote2epg-2.0.0.tar.gz.

File metadata

  • Download URL: gracenote2epg-2.0.0.tar.gz
  • Upload date:
  • Size: 516.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gracenote2epg-2.0.0.tar.gz
Algorithm Hash digest
SHA256 add78f7de63c99cced7e336290e88d41b30cc95f8d5f603b641f5594b031b2a3
MD5 5d5bb4c10040978d8716838c85029168
BLAKE2b-256 cdaf958e4a544bafbe34e90d99bd6060c4b0da7d4109c68c67a99af9bd485b29

See more details on using hashes here.

Provenance

The following attestation bundles were made for gracenote2epg-2.0.0.tar.gz:

Publisher: publish.yml on th0ma7/gracenote2epg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gracenote2epg-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: gracenote2epg-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 549.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gracenote2epg-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83c1e4aa2efb99d5f129b0c279c4c6f2a1614f1641b5d37540ffb64fd8a41f2b
MD5 a4c7628c1672e1d6669e7dd0e2a5f0e3
BLAKE2b-256 57b10ae9172b6135811780fd4598f8daf71b73326400618f0d306aac82f9b39c

See more details on using hashes here.

Provenance

The following attestation bundles were made for gracenote2epg-2.0.0-py3-none-any.whl:

Publisher: publish.yml on th0ma7/gracenote2epg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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