From 433026dcd37e16e87dbaf9e4fcb03ec1cbb75c30 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 23 Jan 2023 16:29:05 +0300 Subject: [PATCH 1/6] Create content.html --- .../__data__/content.html | 2177 +++++++++++++++++ 1 file changed, 2177 insertions(+) create mode 100644 sites/worldfishingnetwork.com/__data__/content.html diff --git a/sites/worldfishingnetwork.com/__data__/content.html b/sites/worldfishingnetwork.com/__data__/content.html new file mode 100644 index 00000000..b4c5956f --- /dev/null +++ b/sites/worldfishingnetwork.com/__data__/content.html @@ -0,0 +1,2177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +WFN - Schedule - World Fishing Network + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ Skip to main content + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + + + + +
+ +
+ +
+
+
+

12:00 AM ET

+
+
+
+
+ Major League Fishing +
+
+

Major League Fishing

+ Challenge Cup Sudden Death Round 2 +

Nine anglers race to a target weight on Lake Wylie in the Lucas Oil Challenge Cup, presented by B&W Trailer Hitches, Rock Hill, South Carolina. Only four will move on to the Championship Round.

+
+
+
+ +
+
+

2:00 AM ET

+
+
+
+
+ Major League Fishing +
+
+

Major League Fishing's All Angles

+ Inside the Lucas Oil Qualifier- Match 2, Day 2 +

All Angles inside look at the Lucas Oil Qualifier Match 2, Day 2 with angler commentary.

+
+
+
+ +
+
+

2:30 AM ET

+
+
+
+
+ Pelican +
+
+

Pelican's Ultimate Match Fishing

+ Jacob Wheeler vs Dustin Connell +

2-time UMF champion Jacob Wheeler goes toe-to-toe with Dustin Connell in a battle of the top ranked bass anglers in the world. From Pickwick Lake

+
+
+
+ +
+
+

3:00 AM ET

+
+
+
+
+ Force on Force +
+
+

Force on Force

+ Force on Force Semi Final Rd 1 +

In this epsiode of Strike King's Force on Force presented by Skeeter Boats, it's Semi Final Round 1.

+
+
+
+ +
+
+

3:30 AM ET

+
+
+
+
+ The Hunt for Monster Bass +
+
+

The Hunt for Monster Bass

+ Winter Largemouth +

Professional angler Ott DeFoe hunts down double-digit largemouth bass in the dead of winter in Tennessee.

+
+
+
+ +
+
+

4:00 AM ET

+
+
+
+
+ Major League Fishing +
+
+

Major League Fishing

+ Challenge Cup Sudden Death Round 2 +

Nine anglers race to a target weight on Lake Wylie in the Lucas Oil Challenge Cup, presented by B&W Trailer Hitches, Rock Hill, South Carolina. Only four will move on to the Championship Round.

+
+
+
+ +
+
+

6:00 AM ET

+
+
+
+
+ The Obsession of Carter Andrews +
+
+

The Obsession of Carter Andrews

+ Virginia Muskie +

Carter meets up with Virginia muskie guru and fly desisgner Blane Chocklett in hopes of catching the ''the fish of a thousand casts.''

+
+
+
+ +
+
+

6:30 AM ET

+
+
+
+
+ Livin +
+
+

Livin' the Dream with Captain Jimmy Nelson

+ Gulf Reefs and Wrecks +

Capt. Jimmy and Luiza are at The Plantation on Crystal River and find more than they can ask for when they head offshore.

+
+
+
+ +
+
+

7:00 AM ET

+
+
+
+
+ Bill Dance Saltwater +
+
+

Bill Dance Saltwater

+ Jetty Reds Part 1 +

Bill joins his longtime buddy Mike Frenette at the mouth of the Mississippi River to fish the jetties for some redfish action that you just have to see! Part 1.

+
+
+
+ +
+
+

7:30 AM ET

+
+
+
+
+ The Seahunter +
+
+

The Seahunter

+ Veteran's Day +

Rob Fordyce takes an old friend fishing.

+
+
+
+ +
+
+

8:00 AM ET

+
+
+
+
+ BigWater Adventures +
+
+

BigWater Adventures

+ Delacroix, Louisiana Redfish +

Redfish every way you can catch them with Dufrene's Guide Service of Delacroix, Louisiana.

+
+
+
+ +
+
+

8:30 AM ET

+
+
+
+
+ Trev Gowdy +
+
+

Trev Gowdy's Monster Fish

+ Amazonian Peacock Bass +

Deep in the Amazon rainforest, Trev Gowdy teams up with the locals to hunt down a mythic monster peacock bass.

+
+
+
+ +
+
+

9:00 AM ET

+
+
+
+
+ Spear Life +
+
+

Spear Life

+ The Big Florida Brunson Bash +

The Spear Life gang is hanging at home for this trip, but they're gonna be joined by one of Jon's good friends, retired NBA star Brad Miller. The plan is to start things out underwater chasing fish, then a little bit of scallop hunting, and finally round things out with a good ''Brunson Bash'' at the house with food, games, and great times.

+
+
+
+ +
+
+

9:30 AM ET

+
+
+
+
+ Facts of Fishing +
+
+

Facts of Fishing

+ Top Tactics I +

It's all about Top Tactics at Facts of Fishing - how Dave caught them this year and what made them MUNCH! Part 1.

+
+
+
+ +
+
+

10:00 AM ET

+
+
+
+
+ Fishing with Roland Martin +
+
+

Fishing with Roland Martin

+ Everglades Snook and Reds +

Roland works the tidal river eddies with jigs for snook and is looking for tarpon. Than he works the Gulf points for reds with top water.

+
+
+
+ +
+
+

10:30 AM ET

+
+
+
+
+ In-Fisherman TV +
+
+

In-Fisherman TV

+ Presentation Tricks and Trends +

The In-Fisherman staff reveals hard-won secrets from their extensive field research, as they rip spoons to put a grip on smallmouth bass, use rag-tag tactics for walleyes, and employ the newest softbait trailers for largemouth bass.

+
+
+
+ +
+
+

11:00 AM ET

+
+
+
+
+ Lake Commandos +
+
+

Lake Commandos

+ No-Name Lake, Tough Bassin' +

Steve and tournament pro Michala Kofead fish a small urban lake'and pit cranks against soft plastics.

+
+
+
+ +
+
+

11:30 AM ET

+
+
+
+
+ Zona +
+
+

Zona's Awesome Fishing Show

+ Chris Zaldain - Michigan Smallmouth +

Not many scenarios warrant a guest sticking around for a second show of the season. But when swimbait junkie Chris Zaldain begs for a quick stop on some gorgeous Michigan smallmouth waters, you gotta indulge.

+
+
+
+ +
+
+

12:00 PM ET

+
+
+
+
+ The Obsession of Carter Andrews +
+
+

The Obsession of Carter Andrews

+ Virginia Muskie +

Carter meets up with Virginia muskie guru and fly desisgner Blane Chocklett in hopes of catching the ''the fish of a thousand casts.''

+
+
+
+ +
+
+

12:30 PM ET

+
+
+
+
+ Livin +
+
+

Livin' the Dream with Captain Jimmy Nelson

+ Gulf Reefs and Wrecks +

Capt. Jimmy and Luiza are at The Plantation on Crystal River and find more than they can ask for when they head offshore.

+
+
+
+ +
+
+

1:00 PM ET

+
+
+
+
+ Bill Dance Saltwater +
+
+

Bill Dance Saltwater

+ Jetty Reds Part 1 +

Bill joins his longtime buddy Mike Frenette at the mouth of the Mississippi River to fish the jetties for some redfish action that you just have to see! Part 1.

+
+
+
+ +
+
+

1:30 PM ET

+
+
+
+
+ The Seahunter +
+
+

The Seahunter

+ Veteran's Day +

Rob Fordyce takes an old friend fishing.

+
+
+
+ +
+
+

2:00 PM ET

+
+
+
+
+ BigWater Adventures +
+
+

BigWater Adventures

+ Delacroix, Louisiana Redfish +

Redfish every way you can catch them with Dufrene's Guide Service of Delacroix, Louisiana.

+
+
+
+ +
+
+

2:30 PM ET

+
+
+
+
+ Trev Gowdy +
+
+

Trev Gowdy's Monster Fish

+ Amazonian Peacock Bass +

Deep in the Amazon rainforest, Trev Gowdy teams up with the locals to hunt down a mythic monster peacock bass.

+
+
+
+ +
+
+

3:00 PM ET

+
+
+
+
+ Spear Life +
+
+

Spear Life

+ The Big Florida Brunson Bash +

The Spear Life gang is hanging at home for this trip, but they're gonna be joined by one of Jon's good friends, retired NBA star Brad Miller. The plan is to start things out underwater chasing fish, then a little bit of scallop hunting, and finally round things out with a good ''Brunson Bash'' at the house with food, games, and great times.

+
+
+
+ +
+
+

3:30 PM ET

+
+
+
+
+ Facts of Fishing +
+
+

Facts of Fishing

+ Top Tactics I +

It's all about Top Tactics at Facts of Fishing - how Dave caught them this year and what made them MUNCH! Part 1.

+
+
+
+ +
+
+

4:00 PM ET

+
+
+
+
+ Fishing with Roland Martin +
+
+

Fishing with Roland Martin

+ Everglades Snook and Reds +

Roland works the tidal river eddies with jigs for snook and is looking for tarpon. Than he works the Gulf points for reds with top water.

+
+
+
+ +
+
+

4:30 PM ET

+
+
+
+
+ In-Fisherman TV +
+
+

In-Fisherman TV

+ Presentation Tricks and Trends +

The In-Fisherman staff reveals hard-won secrets from their extensive field research, as they rip spoons to put a grip on smallmouth bass, use rag-tag tactics for walleyes, and employ the newest softbait trailers for largemouth bass.

+
+
+
+ +
+
+

5:00 PM ET

+
+
+
+
+ Lake Commandos +
+
+

Lake Commandos

+ No-Name Lake, Tough Bassin' +

Steve and tournament pro Michala Kofead fish a small urban lake'and pit cranks against soft plastics.

+
+
+
+ +
+
+

5:30 PM ET

+
+
+
+
+ Zona +
+
+

Zona's Awesome Fishing Show

+ Chris Zaldain - Michigan Smallmouth +

Not many scenarios warrant a guest sticking around for a second show of the season. But when swimbait junkie Chris Zaldain begs for a quick stop on some gorgeous Michigan smallmouth waters, you gotta indulge.

+
+
+
+ +
+
+

6:00 PM ET

+
+
+
+
+ Lindner +
+
+

Lindner's Angling Edge

+ Postspawn Crappie Tactics +

Watch Al and Dan Lindner target big crappies during the post-spawn period using a new killer panfish jig from Big Bite Baits.

+
+
+
+ +
+
+

6:30 PM ET

+
+
+
+
+ Fishful Thinker TV +
+
+

Fishful Thinker TV

+ The Dock Bite +

Sunny and calm means dock fishing for bass for host Chad LaChance.

+
+
+
+ +
+
+

7:00 PM ET

+
+
+
+
+ Fishing University +
+
+

Fishing University

+ Big Baits for Smallmouth in Virginia +

Ben and Charlie take Glide bait 101 with Elite series pro John Crews and big bait expert Byron Childers and debut the new Spro/KGB Chad Shad 180.

+
+
+
+ +
+
+

7:30 PM ET

+
+
+
+
+ Fishing 411 +
+
+

Fishing 411

+ Flint Wilderness Walleye +

Mark Romanack and Bryan Darland fish walleye on Klotz Lake in the famed Flint Wilderness of Ontario

+
+
+
+ +
+
+

8:00 PM ET

+
+
+
+
+ Jarrett Edwards Outdoors +
+
+

Jarrett Edwards Outdoors

+ High Water Pike +

Join Jarrett Edwards and Beau Meyer as they demonstrate techniques to catch pike in flooded conditions.

+
+
+
+ +
+
+

8:30 PM ET

+
+
+
+
+ Extreme Angler +
+
+

Extreme Angler

+ Cedar Lake Angling Adventures +

Finding the pot of gold below a creek mouth waterfall for multi species adventures.

+
+
+
+ +
+
+

9:00 PM ET

+
+
+
+
+ In-Fisherman TV +
+
+

In-Fisherman TV

+ Hot Baits Happening +

Always in touch with the hottest bait happening for each new season, the In-Fisherman staff goes PowerBait rigging with skirted jigs for prespawn largemouths; practices nuanced Ned rig tactics for finicky smallmouths; and explains the subtleties of using what may be the best lure ever for giant pike, the Johnson Silver Minnow.

+
+
+
+ +
+
+

9:30 PM ET

+
+
+
+
+ Lund +
+
+

Lund's Ultimate Fishing Experience

+ The Kokanee's of Flaming Gorge Reservoir +

Lund Pro Staffer Dave Habets and tournament partner DonRay Limb chase feisty salmonids using specialty gear on the beautiful, sprawling western reservoir.

+
+
+
+ +
+
+

10:00 PM ET

+
+
+
+
+ Lindner +
+
+

Lindner's Angling Edge

+ Postspawn Crappie Tactics +

Watch Al and Dan Lindner target big crappies during the post-spawn period using a new killer panfish jig from Big Bite Baits.

+
+
+
+ +
+
+

10:30 PM ET

+
+
+
+
+ Fishful Thinker TV +
+
+

Fishful Thinker TV

+ The Dock Bite +

Sunny and calm means dock fishing for bass for host Chad LaChance.

+
+
+
+ +
+
+

11:00 PM ET

+
+
+
+
+ Fishing University +
+
+

Fishing University

+ Big Baits for Smallmouth in Virginia +

Ben and Charlie take Glide bait 101 with Elite series pro John Crews and big bait expert Byron Childers and debut the new Spro/KGB Chad Shad 180.

+
+
+
+ +
+
+

11:30 PM ET

+
+
+
+
+ Fishing 411 +
+
+

Fishing 411

+ Flint Wilderness Walleye +

Mark Romanack and Bryan Darland fish walleye on Klotz Lake in the famed Flint Wilderness of Ontario

+
+
+
+ +
+
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+
+
+ × +
+
+
+
+ + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + From e217ff28cb141ccc4cae9414d6042fe531962209 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 23 Jan 2023 16:29:07 +0300 Subject: [PATCH 2/6] Create no_content.html --- .../__data__/no_content.html | 896 ++++++++++++++++++ 1 file changed, 896 insertions(+) create mode 100644 sites/worldfishingnetwork.com/__data__/no_content.html diff --git a/sites/worldfishingnetwork.com/__data__/no_content.html b/sites/worldfishingnetwork.com/__data__/no_content.html new file mode 100644 index 00000000..59a04991 --- /dev/null +++ b/sites/worldfishingnetwork.com/__data__/no_content.html @@ -0,0 +1,896 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +WFN - Schedule - World Fishing Network + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ Skip to main content + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + + + + +
+
+
    + +
+
+
+ +
+ +
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+
+
+ × +
+
+
+
+ + + + + + + +
+ + + + + + + + + + + + + + + From 1449df768740536a6b51552600dac3278f5570bf Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 23 Jan 2023 16:29:13 +0300 Subject: [PATCH 3/6] Create worldfishingnetwork.com.test.js --- .../worldfishingnetwork.com.test.js | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sites/worldfishingnetwork.com/worldfishingnetwork.com.test.js diff --git a/sites/worldfishingnetwork.com/worldfishingnetwork.com.test.js b/sites/worldfishingnetwork.com/worldfishingnetwork.com.test.js new file mode 100644 index 00000000..98b100c6 --- /dev/null +++ b/sites/worldfishingnetwork.com/worldfishingnetwork.com.test.js @@ -0,0 +1,59 @@ +// npx epg-grabber --config=sites/worldfishingnetwork.com/worldfishingnetwork.com.config.js --channels=sites/worldfishingnetwork.com/worldfishingnetwork.com.channels.xml --output=guide.xml --days=2 + +const { parser, url } = require('./worldfishingnetwork.com.config.js') +const fs = require('fs') +const path = require('path') +const dayjs = require('dayjs') +const utc = require('dayjs/plugin/utc') +const customParseFormat = require('dayjs/plugin/customParseFormat') +dayjs.extend(customParseFormat) +dayjs.extend(utc) + +const date = dayjs.utc('2023-01-24', 'YYYY-MM-DD').startOf('d') +const channel = { + site_id: '#', + xmltv_id: 'WorldFishingNetwork.us' +} + +it('can generate valid url', () => { + expect(url({ date })).toBe('https://www.worldfishingnetwork.com/schedule/77420?day=Tue') +}) + +it('can parse response', () => { + const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.html'), 'utf8') + let results = parser({ content, date }) + results = results.map(p => { + p.start = p.start.toJSON() + p.stop = p.stop.toJSON() + return p + }) + + expect(results[0]).toMatchObject({ + start: '2023-01-24T05:00:00.000Z', + stop: '2023-01-24T07:00:00.000Z', + title: `Major League Fishing`, + sub_title: 'Challenge Cup Sudden Death Round 2', + description: + 'Nine anglers race to a target weight on Lake Wylie in the Lucas Oil Challenge Cup, presented by B&W Trailer Hitches, Rock Hill, South Carolina. Only four will move on to the Championship Round.', + icon: 'https://content.osgnetworks.tv/shows/major-league-fishing-thumbnail.jpg' + }) + + expect(results[41]).toMatchObject({ + start: '2023-01-25T04:30:00.000Z', + stop: '2023-01-25T05:00:00.000Z', + title: `Fishing 411`, + sub_title: 'Flint Wilderness Walleye', + description: + 'Mark Romanack and Bryan Darland fish walleye on Klotz Lake in the famed Flint Wilderness of Ontario', + icon: 'https://content.osgnetworks.tv/shows/fishin-411-thumbnail.jpg' + }) +}) + +it('can handle empty guide', () => { + const results = parser({ + date, + content: fs.readFileSync(path.resolve(__dirname, '__data__/no_content.html'), 'utf8') + }) + + expect(results).toMatchObject([]) +}) From 9e690dd1b5da45f3c954f512b0ebc20c944dd6a7 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 23 Jan 2023 16:29:17 +0300 Subject: [PATCH 4/6] Create worldfishingnetwork.com.config.js --- .../worldfishingnetwork.com.config.js | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 sites/worldfishingnetwork.com/worldfishingnetwork.com.config.js diff --git a/sites/worldfishingnetwork.com/worldfishingnetwork.com.config.js b/sites/worldfishingnetwork.com/worldfishingnetwork.com.config.js new file mode 100644 index 00000000..fa126d0a --- /dev/null +++ b/sites/worldfishingnetwork.com/worldfishingnetwork.com.config.js @@ -0,0 +1,79 @@ +const cheerio = require('cheerio') +const dayjs = require('dayjs') +const utc = require('dayjs/plugin/utc') +const timezone = require('dayjs/plugin/timezone') +const customParseFormat = require('dayjs/plugin/customParseFormat') + +dayjs.extend(utc) +dayjs.extend(timezone) +dayjs.extend(customParseFormat) + +module.exports = { + site: 'worldfishingnetwork.com', + days: 2, + url({ date }) { + return `https://www.worldfishingnetwork.com/schedule/77420?day=${date.format('ddd')}` + }, + parser({ content, date }) { + const programs = [] + const items = parseItems(content, date) + items.forEach(item => { + let $item = cheerio.load(item) + const prev = programs[programs.length - 1] + let start = parseStart($item, date) + if (prev) { + if (start.isBefore(prev.start)) { + start = start.add(1, 'd') + date = date.add(1, 'd') + } + prev.stop = start + } + const stop = start.add(30, 'm') + programs.push({ + title: parseTitle($item), + sub_title: parseSubTitle($item), + description: parseDescription($item), + icon: parseIcon($item), + start, + stop + }) + }) + + return programs + } +} + +function parseTitle($item) { + return $item('.show-title > h3').text().trim() +} + +function parseSubTitle($item) { + return $item('.show-title').clone().children().remove().end().text().trim() +} + +function parseDescription($item) { + return $item('.show-title > p').text().trim() +} + +function parseIcon($item) { + const url = $item('.show-img > img').attr('src') + + return url ? `https:${url}` : null +} + +function parseStart($item, date) { + const time = $item('.show-time > h2').clone().children().remove().end().text().trim() + const period = $item('.show-time > h2 > span > strong').text().trim() + + return dayjs.tz( + `${date.format('YYYY-MM-DD')} ${time} ${period}`, + 'YYYY-MM-DD HH:mm A', + 'America/New_York' + ) +} + +function parseItems(content, channel, date) { + const $ = cheerio.load(content) + + return $('.show-item').toArray() +} From 0122bff9d3b93807d81b01d9d59c6047d2fa9114 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 23 Jan 2023 16:29:20 +0300 Subject: [PATCH 5/6] Create worldfishingnetwork.com.channels.xml --- .../worldfishingnetwork.com.channels.xml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sites/worldfishingnetwork.com/worldfishingnetwork.com.channels.xml diff --git a/sites/worldfishingnetwork.com/worldfishingnetwork.com.channels.xml b/sites/worldfishingnetwork.com/worldfishingnetwork.com.channels.xml new file mode 100644 index 00000000..68fa1bed --- /dev/null +++ b/sites/worldfishingnetwork.com/worldfishingnetwork.com.channels.xml @@ -0,0 +1,6 @@ + + + + World Fishing Network + + From 20b4381d84face4a1c4ec49cb759a4b70607b272 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 23 Jan 2023 16:29:25 +0300 Subject: [PATCH 6/6] Create worldfishingnetwork.com.yml --- .github/workflows/worldfishingnetwork.com.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/worldfishingnetwork.com.yml diff --git a/.github/workflows/worldfishingnetwork.com.yml b/.github/workflows/worldfishingnetwork.com.yml new file mode 100644 index 00000000..310ca225 --- /dev/null +++ b/.github/workflows/worldfishingnetwork.com.yml @@ -0,0 +1,17 @@ +name: worldfishingnetwork.com +on: + schedule: + - cron: '0 3 * * *' + workflow_dispatch: + workflow_run: + workflows: [_trigger] + types: + - completed +jobs: + load: + uses: ./.github/workflows/_load.yml + with: + site: ${{github.workflow}} + secrets: + APP_ID: ${{ secrets.APP_ID }} + APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}