diff --git a/README.md b/README.md
index 2b85de6b..0a3a594c 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ Sources are grouped the same way as on the **Sources** page. A handful of free s
| Group | Sources |
|-------|---------|
| **Free** | The Roku Channel, Samsung TV Plus, Plex, Xumo Play, LG Channels, Vizio WatchFree+, TCL TV+, Whale TV+, STIRR, FreeLiveSports, Pluto TV, Sling Freestream, Local Now, Vidaa Free TV, ViX, Zeam |
-| **Direct from Networks** (free) | **Free Networks** (over 60 networks that stream on their own sites: DW, NHK, Al Jazeera, Bloomberg, CBS News, NewsNation, CGTN, Yahoo, The CW's FAST lineup, OG Network, Cineverse, Heartland+, Shout! TV, Red Bull TV, sports.tv, the Olympic Channel, TrillerTV, TNA, HSN, QVC, Adult Swim, Bally Sports Live, Hallmark and more), Gray Local News, NCAA, Northeast Sports Network, PBS, C-SPAN |
+| **Direct from Networks** (free) | **Free Networks** (over 60 networks that stream on their own sites: DW, NHK, Al Jazeera, Bloomberg, CBS News, NewsNation, WGN+, KTLA+, PIX11+, CGTN, Yahoo, The CW's FAST lineup, OG Network, Cineverse, Heartland+, Shout! TV, Red Bull TV, sports.tv, the Olympic Channel, TrillerTV, TNA, HSN, QVC, Adult Swim, Bally Sports Live, Hallmark and more), Gray Local News, NCAA, Northeast Sports Network, PBS, C-SPAN |
| **Free with an account** | Tubi, Amazon Prime Free Channels, FreeCast |
| **Subscription** | DirecTV Stream, Spectrum, Hulu + Live TV, Fubo, Philo, Frndly TV, ESPN, NFL, CBS, MLB, FOX One, Paramount+, HBO Max, Amazon Sports, B1G+ |
| **TV provider** (TV Everywhere) | Sign in with your cable or streaming provider: A+E Networks, AMC Networks, SundanceTV, CNN, C-SPAN, DAZN (YES, MSG), Discovery, Disney (ABC, FX, Nat Geo, Disney Channel), FOX, NBCUniversal, Versant (USA, E!, Syfy, CNBC, MS NOW, Golf), Warner Bros. Discovery (TBS, TNT, truTV, TCM), Univision, Tennis Channel, Newsmax, NESN, SportsNet Pittsburgh, Monumental Sports, Altitude, MyOutdoorTV, REELZ (NESN, SportsNet Pittsburgh, Monumental and Altitude also take a direct subscription instead of a provider) |
@@ -437,7 +437,7 @@ Disabling a source deletes all its channels from the DB. Re-enabling and running
| C-SPAN | None | **Default off.** Free congressional/public-affairs event streams (floor sessions, hearings, Washington Journal). The 24/7 C-SPAN 1/2/3 networks are a separate [TV provider](#tv-provider-tv-everywhere) source |
| ViX | None | **Default off.** About 80 free Spanish-language channels (N+ Univision news, telenovelas, movies, comedy, sports). Nearly all are Widevine DRM, so they play through the DRM bridge |
| Zeam | None | **Default off.** Syncbak's free local-news and FAST service (formerly VUit): about 400 channels across every market. Clear HLS |
-| Free Networks | None | **Default off.** Over 60 networks that stream free on their own websites: news (DW, Al Jazeera, TRT, NHK, Arirang, Bloomberg, CBS News, CGTN in six languages, Yahoo Finance, Scripps, Newsmax, NewsNation, Sky News, KSL and more), faith (EWTN, TBN, CBN, 3ABN), shopping (HSN, QVC), Sinclair's diginets, The CW's FAST lineup, A+E's FAST channels, OG Network (and its partner apps TrueTVplus and Flou TV), Cineverse (with RetroCrush and JoySauce), BeOND TV, Mansa TV, FreeTV (12 Spanish channels), i24NEWS, NWSL+ 24/7, Tastemade, Outside TV, Heartland+ (about 40 channels, including Stingray's), Shout! TV (MST3K, Johnny Carson, Carol Burnett and more), TrillerTV, Bowling TV, Watch AEW, sports.tv (33 sports channels and 32 local news stations), Red Bull TV's nine channels, the Olympic Channel, TNA Wrestling 24/7 and TNA en Español, Cowboy+ Sports, Yahoo Sports, VSiN, SHIFT TV and BEATMAG, JTV, CBS's free Judge Judy, Hot Bench and Car Chase channels, Adult Swim's 24/7 marathon streams, Bally Sports Live and Hallmark's Non-Stop channels. Adult Swim, Bally Sports Live and Hallmark used to be separate sources; upgrading moves their channels into Free Networks with the same channel ids, numbers, settings, play URLs and feed selections. Channels already carried by another network are mostly skipped (BeOND lists all of its own), and each network can be switched off on the source card. Each network is fetched separately, so one outage doesn't affect the others |
+| Free Networks | None | **Default off.** Over 60 networks that stream free on their own websites: news (DW, Al Jazeera, TRT, NHK, Arirang, Bloomberg, CBS News, CGTN in six languages, Yahoo Finance, Scripps, Newsmax, NewsNation, WGN+, KTLA+, PIX11+, Sky News, KSL and more), faith (EWTN, TBN, CBN, 3ABN), shopping (HSN, QVC), Sinclair's diginets, The CW's FAST lineup, A+E's FAST channels, OG Network (and its partner apps TrueTVplus and Flou TV), Cineverse (with RetroCrush and JoySauce), BeOND TV, Mansa TV, FreeTV (12 Spanish channels), i24NEWS, NWSL+ 24/7, Tastemade, Outside TV, Heartland+ (about 40 channels, including Stingray's), Shout! TV (MST3K, Johnny Carson, Carol Burnett and more), TrillerTV, Bowling TV, Watch AEW, sports.tv (33 sports channels and 32 local news stations), Red Bull TV's nine channels, the Olympic Channel, TNA Wrestling 24/7 and TNA en Español, Cowboy+ Sports, Yahoo Sports, VSiN, SHIFT TV and BEATMAG, JTV, CBS's free Judge Judy, Hot Bench and Car Chase channels, Adult Swim's 24/7 marathon streams, Bally Sports Live and Hallmark's Non-Stop channels. Adult Swim, Bally Sports Live and Hallmark used to be separate sources; upgrading moves their channels into Free Networks with the same channel ids, numbers, settings, play URLs and feed selections. Channels already carried by another network are mostly skipped (BeOND lists all of its own), and each network can be switched off on the source card. Each network is fetched separately, so one outage doesn't affect the others |
| Gray Local News | None | **Default off.** Gray Media's local TV station streams: pick stations from 112 markets on the source card, and each adds its newscast, 24/7 weather and breaking-news channels. InvestigateTV and Local News Live are always included. Clear HLS |
| NCAA | None | **Default off.** NCAA.com's 16 always-on 24/7 sport channels, plus championship games as [event channels](#event-channels), filtered by sport and division. Clear HLS |
| Northeast Sports Network | None | **Default off.** Free live New England college and high-school games from nsnsports.net as [event channels](#event-channels), filtered by sport and school. Pay-per-view games are left out. Clear HLS |
diff --git a/app/scrapers/free_networks/__init__.py b/app/scrapers/free_networks/__init__.py
index 85d787b2..aa40fb66 100644
--- a/app/scrapers/free_networks/__init__.py
+++ b/app/scrapers/free_networks/__init__.py
@@ -17,7 +17,7 @@
from . import (
adultswim, aetn, aljazeera, arirang, ballysports, beond, bloomberg, cbn, cbsnews, cgtn, cineverse, cowboyplus, cw, dw, ewtn,
freetv, fstv, gameandfish, gizmott, hallmark, heartland, hsn,
- i24news, jtv, ksl, mansa, newsmax, newsnation, nhk, nwsl, og_network, olympics, outside, positiv, qvc, redbull, scripps, shift, simple,
+ i24news, jtv, ksl, mansa, newsmax, newsnation, nexstar, nhk, nwsl, og_network, olympics, outside, positiv, qvc, redbull, scripps, shift, simple,
sinclair, shout, sotal_partners, sportstv, tastemade, tbn, triller, trt, vsin, yahoo,
)
@@ -26,7 +26,7 @@
NETWORKS = [
sinclair.Sinclair(), dw.DW(), aljazeera.AlJazeera(), i24news.I24News(), trt.TRT(), nhk.NHK(),
arirang.Arirang(), bloomberg.Bloomberg(), cbsnews.CBSNews(), scripps.Scripps(),
- newsmax.Newsmax(), newsnation.NewsNation(), fstv.FreeSpeechTV(), ewtn.EWTN(), positiv.PosiTV(), tbn.TBN(),
+ newsmax.Newsmax(), newsnation.NewsNation(), nexstar.Nexstar(), fstv.FreeSpeechTV(), ewtn.EWTN(), positiv.PosiTV(), tbn.TBN(),
hsn.HSN(), qvc.QVC(), tastemade.Tastemade(), aetn.AETN(), ksl.KSL(), cbn.CBN(),
gameandfish.GameAndFish(), outside.OutsideTV(), cw.CW(), cineverse.Cineverse(), og_network.OGNetwork(),
*sotal_partners.NETWORKS, beond.BeOND(), mansa.Mansa(), freetv.FreeTV(), nwsl.NWSL(), triller.Triller(), heartland.Heartland(), shout.Shout(),
@@ -179,7 +179,7 @@ def _reraise_if_phase_timeout(exc: Exception) -> None:
class FreeNetworksScraper(BaseScraper):
"""
Free networks that stream on their own websites: news (DW, Al Jazeera, i24NEWS, TRT,
- NHK, Arirang, CGTN, Bloomberg, CBS News, Scripps, Newsmax2 + World at War, NewsNation, Free Speech TV, Sky
+ NHK, Arirang, CGTN, Bloomberg, CBS News, Scripps, Newsmax2 + World at War, NewsNation, WGN+, KTLA+, PIX11+, Free Speech TV, Sky
News, Global News, KSL, Yahoo Finance), sports (Yahoo Sports Network, SportsGrid, SPEED SPORT 1, VSiN,
SHIFT TV, Red Bull TV's nine channels), faith (EWTN, PosiTV, TBN, CBN, NRB, theDove, 3ABN's ten networks), shopping
(HSN, QVC, JTV, Shop LC), BEATMAG's music channels, Sinclair's diginets (Comet, Charge!, TheNest), Tastemade, A+E's
diff --git a/app/scrapers/free_networks/_common.py b/app/scrapers/free_networks/_common.py
index a219b8db..f74cc779 100644
--- a/app/scrapers/free_networks/_common.py
+++ b/app/scrapers/free_networks/_common.py
@@ -14,6 +14,9 @@
ET = ZoneInfo('America/New_York')
UTC = timezone.utc
+# Anvato/Lura access key shared by the networks that play through tkx.mp.lura.live.
+ANVATO_ACCESS_KEY = 'GNLYj4WPEPgKWUvG6mTVNFejokMyVq3x'
+
class EmptyPlaylistError(RuntimeError):
"""resolve() found the stream answering but its variant lists no segments.
diff --git a/app/scrapers/free_networks/newsnation.py b/app/scrapers/free_networks/newsnation.py
index b89c34c0..64c68c65 100644
--- a/app/scrapers/free_networks/newsnation.py
+++ b/app/scrapers/free_networks/newsnation.py
@@ -23,10 +23,9 @@
import json
import re
-from ._common import Network, NetChannel, logger
+from ._common import ANVATO_ACCESS_KEY, Network, NetChannel, logger
_CONFIG = 'https://tkx.mp.lura.live/rest/v2/mcp/video/{}'
-_ACCESS_KEY = 'GNLYj4WPEPgKWUvG6mTVNFejokMyVq3x'
_VIDEO_ID = 'adstP5LOdMYydk9w'
_LOGO = 'https://tmsimg.fancybits.co/assets/s91096_ll_h15_ad.png?w=360&h=270'
_JSONP_RE = re.compile(r'^[^(]*\((.*)\)\s*;?\s*$', re.S)
@@ -46,7 +45,7 @@ def channels(self, s):
return [NetChannel('live', 'NewsNation', _VIDEO_ID, logo=_LOGO, category='News', gracenote_id='91096')]
def resolve(self, s, ref):
- r = s.session.get(_CONFIG.format(ref), params={'anvack': _ACCESS_KEY}, timeout=15)
+ r = s.session.get(_CONFIG.format(ref), params={'anvack': ANVATO_ACCESS_KEY}, timeout=15)
m = _JSONP_RE.search(r.text)
try:
data = json.loads(m.group(1) if m else r.text)
diff --git a/app/scrapers/free_networks/nexstar.py b/app/scrapers/free_networks/nexstar.py
new file mode 100644
index 00000000..3b671c35
--- /dev/null
+++ b/app/scrapers/free_networks/nexstar.py
@@ -0,0 +1,445 @@
+"""Nexstar Plus streams and program guides.
+
+The live players come from the stations' public WordPress pages. PIX11+ has a
+Lura schedule feed; WGN+ and KTLA+ publish recurring schedules on their sites.
+"""
+from __future__ import annotations
+
+import html
+import json
+import re
+from datetime import datetime, time, timedelta
+from urllib.parse import urlsplit
+from zoneinfo import ZoneInfo
+
+import requests
+
+from ._common import ANVATO_ACCESS_KEY, Network, NetChannel, from_epoch, logger, program
+
+_LURA_API = 'https://tkx.mp.lura.live/rest/v2/mcp/video/{}'
+_LURA_FEED = 'https://feed.mp.lura.live/v3/feed/{}'
+_FEED_PAGE_SIZE = 100
+_GUIDE_DAYS = 7
+_PLAYER_RE = re.compile(r'data-nexstar-video="([^"]+)"')
+_JSONP_RE = re.compile(r'^[^(]*\((.*)\)\s*;?\s*$', re.S)
+_ID_RE = re.compile(r'[A-Za-z0-9_-]+')
+_FEED_ID_RE = re.compile(r'\bfeedid=([A-Za-z0-9_-]+)', re.I)
+_LI_RE = re.compile(r'