Guide: EPG TVGuide.com for Local Channels #1541
blake502
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If you (like me) want iptv-org/epg to pull TVGuide.com data for local channels (IE: news channels), this guide should help!
First, we'll need to locate your local "provider" ID for TVGuide.com, as well as any "channel" IDs you want.
I use Brave browser, but it should be pretty similar for any Chromium-based browser.
Begin by navigating to: https://www.tvguide.com/listings/

Select "Provider" (if you already have a provider selected, consider using an "Incognito" window for consistency with the next steps)
Find your local provider, but do not hit "Apply" yet. In my case, I'm using Antenna Broadcast for Flavortown

Press F12 to open your brower's developer console. Use the Network tab.

This "recording" icon indicates that we're recording all network activity
With the Network tab recording, now hit "Apply" to select your provider

You should see a bunch of activity on the Network section of the developer console (mostly a lot of icons). You can pause the recording at this point.

Locate the
tvgServiceProviderAddRequestedProxyentry- It should be at the top, before any of the icons loaded. Click it.In the Payload section, you should see a JSON response. You need to locate the
service_provider_id. It should be a 10-digit number, likely starting with 9. That is your provider ID. Copy it somewhere.Next, locate the

web?start=1000000000&durection=120entry (the "start" will be different).In the Response tab, you should see JSON blocks for
channelandprogramSchedules. Ignore theprogramSchedules, and note thesourceIdof any channels you want- Use thefullNamefield to identify channels. Here, I've located the local NBC channel for my city Flavortown, USA.Note: You can also locate your
providerIdat the top of this response.Now, we can add those channels to

channels.xml:<channel site="tvguide.comlocal" site_id="9200000100" lang="en" xmltv_id="NBC.(WOWEE).Flavortown,.USA.us">NBC: USA FLAVORTOWN WOWEE</channel>Note: The
siteis a custom site that we will create next. I'm using the nametvguide.comlocalto differentiate it fromtvguide.com. Thesite_idis the channel ID we just located. Thexmltv_idshould match thetvg-idfrom your m3u playlist. The name can be any "friendly name" of your choosing.Now we will create the site. We'll use the original tvguide.com site as a template: https://raw.githubusercontent.com/iptv-org/epg/refs/heads/master/sites/tvguide.com/tvguide.com.config.js (right-click, Save As...)
Open the file with any text editor. I'll be using VS Code. We need to make 3 changes to this file.

On line 5: Change
'site:tvguide.com'to'site:tvguide.comlocal'On line 10: Change
'9100001138'to the provider ID you located previouslyOn line 20: Change
'tvguide.com'to'tvguide.comlocal'Save the file as
tvguide.comlocal.config.jsFinally, we need to provide this new config to the epg program. There are 3 ways you might do this, depending on how you run epg.
If you run epg directly
Simply move the newly created config to
/epg/sites/tvguide.comlocal/tvguide.comlocal.config.jsNote: You will need to create the
tvguide.comlocaldirectory.If you run epg with docker compose
You can provide the new config to the container with a

volumesentry:- './epg/tvguide.comlocal.config.js:/epg/sites/tvguide.comlocal/tvguide.comlocal.config.js'If you run epg with docker (without docker compose)
Add the volume to your container with the
-vargdocker run -p 3000:3000 -v ./epg/tvguide.comlocal.config.js:/epg/sites/tvguide.comlocal/tvguide.comlocal.config.jsBeta Was this translation helpful? Give feedback.
All reactions