Merge pull request #2612 from iptv-org/add-thesportplus.com

Add thesportplus.com
This commit is contained in:
PopeyeTheSai10r 2025-01-17 20:43:01 -08:00 committed by GitHub
commit 7cd9ce61b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 514 additions and 0 deletions

View file

@ -0,0 +1,223 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Sport Plus</title>
<meta content="" name="description" />
<meta content="" name="keywords" />
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon" />
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon" />
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Satisfy"
rel="stylesheet"
/>
<!-- Vendor CSS Files -->
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet" />
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet" />
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet" />
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet" />
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- =======================================================
* Template Name: Laura - v4.10.0
* Template URL: https://bootstrapmade.com/laura-free-creative-bootstrap-theme/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
======================================================== -->
</head>
<body>
<!-- ======= Header ======= -->
<header id="header" class="fixed-top d-flex justify-content-center align-items-center">
<nav id="navbar" class="navbar">
<ul>
<li><a class="nav-link scrollto" href="index.php#hero">Home</a></li>
<li><a class="nav-link scrollto" href="index.php#about">About</a></li>
<li><a class="nav-link scrollto" href="index.php#services">Platforms</a></li>
<li class="dropdown">
<a href="#"><span>TV Guide</span> <i class="bi bi-chevron-down"></i></a>
<ul>
<li><a href="schedule_usa.php">Sport Plus U.S.A.</a></li>
<li><a href="schedule_aus.php">Sport Plus Australia</a></li>
<li><a href="schedule_euro.php">Sport Plus Europe</a></li>
</ul>
</li>
<li><a class="nav-link scrollto" href="index.php#contact">Contact</a></li>
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav>
<!-- .navbar -->
</header>
<!-- End Header -->
<main id="main">
<!-- ======= My Resume Section ======= -->
<section id="resume" class="resume">
<div class="container">
<div class="section-title">
<span>Sport Plus U.S.A.</span>
<h2>Sport Plus U.S.A.</h2>
<!--<p>Sit sint consectetur velit quisquam cupiditate impedit suscipit alias</p>-->
</div>
<div class="btn-wrap">
<a href="schedule_usa.php?d=2025-01-18" class="btn-buy">&laquo;</a>
<!--<a href="schedule_usa.php?d=2025-01-18" class="btn-buy">SAT 18/01</a>-->
<a href="#" class="btn-buy">SUN 19/01</a>
<!--<a href="schedule_usa.php?d=2025-01-20" class="btn-buy">MON 20/01</a>-->
<a href="schedule_usa.php?d=2025-01-20" class="btn-buy">&raquo;</a>
</div>
<div class="row d-flex align-items-center justify-content-center">
<div class="col-lg-4">
<!--<h3 class="resume-title">SUNDAY 19/01</h3>-->
<h5 class="section-title">*New York time</h5>
<div class="resume-item">
<h4>01:00</h4>
<h5>ASTERAS vs ATROMITOS<span style="color: #ff0000"></span></h5>
<p><em>Super League Season 24-25 MD 4</em></p>
</div>
<div class="resume-item">
<h4>03:00</h4>
<h5>KALLITHEA vs VOLOS<span style="color: #ff0000"></span></h5>
<p><em>Super League Season 24-25 MD 19</em></p>
</div>
<div class="resume-item">
<h4>05:00</h4>
<h5>OLYMPIACOS vs MAROUSI<span style="color: #ff0000"></span></h5>
<p><em>Greek Basket League 24-25 GD 11</em></p>
</div>
<div class="resume-item">
<h4>07:00</h4>
<h5>PURE ACTION<span style="color: #ff0000"></span></h5>
<p><em>Extreme Sports </em></p>
</div>
<div class="resume-item">
<h4>08:00</h4>
<h5>ATROMITOS vs OLYMPIACOS<span style="color: #ff0000"> LIVE</span></h5>
<p><em>Super League Season 24-25 MD 19</em></p>
</div>
<div class="resume-item">
<h4>10:00</h4>
<h5>LEVADIAKOS vs ASTERAS<span style="color: #ff0000"></span></h5>
<p><em>Super League Season 24-25 MD 19</em></p>
</div>
<div class="resume-item">
<h4>12:00</h4>
<h5>ARIS vs PAOK<span style="color: #ff0000"> LIVE</span></h5>
<p><em>Super League Season 24-25 MD 19</em></p>
</div>
<div class="resume-item">
<h4>15:00</h4>
<h5>AEK vs PAOK<span style="color: #ff0000"></span></h5>
<p><em>Greek Basket League 24-25 GD 15</em></p>
</div>
<div class="resume-item">
<h4>14:00</h4>
<h5>PURE ACTION<span style="color: #ff0000"></span></h5>
<p><em>Extreme Sports </em></p>
</div>
<div class="resume-item">
<h4>17:00</h4>
<h5>SPORTSHOW<span style="color: #ff0000"></span></h5>
<p><em>Super League </em></p>
</div>
<div class="resume-item">
<h4>19:00</h4>
<h5>ATROMITOS vs OLYMPIACOS<span style="color: #ff0000"></span></h5>
<p><em>Super League Season 24-25 MD 19</em></p>
</div>
<div class="resume-item">
<h4>21:00</h4>
<h5>ARIS vs PAOK<span style="color: #ff0000"></span></h5>
<p><em>Super League Season 24-25 MD 19</em></p>
</div>
<div class="resume-item">
<h4>23:00</h4>
<h5>SPORTSHOW<span style="color: #ff0000"></span></h5>
<p><em>Super League </em></p>
</div>
</div>
</div>
</div>
</section>
<!-- End My Resume Section -->
</main>
<!-- End #main -->
<!-- ======= Footer ======= -->
<footer id="footer">
<div class="container">
<img src="assets/img/logosp.png" class="img-fluid" style="width: 30%" alt="" />
<p>Premium sports experience</p>
<div class="social-links">
<!--<a href="#" class="twitter"><i class="bx bxl-twitter"></i></a>-->
<a href="https://www.facebook.com/sportplustv" class="facebook" target="_blank"
><i class="bx bxl-facebook"></i
></a>
<a href="https://www.instagram.com/thesportplustv/" class="instagram" target="_blank"
><i class="bx bxl-instagram"></i
></a>
<!--<a href="#" class="google-plus"><i class="bx bxl-skype"></i></a>-->
<!--<a href="#" class="linkedin"><i class="bx bxl-linkedin"></i></a>-->
</div>
<div class="copyright">
&copy; Copyright 2025<strong><span> Sport Plus</span></strong
>. All Rights Reserved
</div>
<div class="credits">
<!-- All the links in the footer should remain intact. -->
<!-- You can delete the links only if you purchased the pro version. -->
<!-- Licensing information: https://bootstrapmade.com/license/ -->
<!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/laura-free-creative-bootstrap-theme/ -->
Development by
<a href="https://egiannopo.com/" target="_blank" style="color: #28b3ae !important">EG</a
>&nbsp;&nbsp;&nbsp;Theme by
<a href="https://bootstrapmade.com/" target="_blank" style="color: #28b3ae !important"
>BootstrapMade</a
>
</div>
</div>
</footer>
<!-- End Footer -->
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"
><i class="bi bi-arrow-up-short"></i
></a>
<!-- Vendor JS Files -->
<script src="assets/vendor/purecounter/purecounter_vanilla.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/glightbox/js/glightbox.min.js"></script>
<script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="assets/vendor/swiper/swiper-bundle.min.js"></script>
<script src="assets/vendor/waypoints/noframework.waypoints.js"></script>
<!--<script src="assets/vendor/php-email-form/validate.js"></script>-->
<!-- Template Main JS File -->
<script src="assets/js/main.js"></script>
</body>
</html>

View file

@ -0,0 +1,145 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Sport Plus</title>
<meta content="" name="description" />
<meta content="" name="keywords" />
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon" />
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon" />
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Satisfy"
rel="stylesheet"
/>
<!-- Vendor CSS Files -->
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet" />
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet" />
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet" />
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet" />
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- =======================================================
* Template Name: Laura - v4.10.0
* Template URL: https://bootstrapmade.com/laura-free-creative-bootstrap-theme/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
======================================================== -->
</head>
<body>
<!-- ======= Header ======= -->
<header id="header" class="fixed-top d-flex justify-content-center align-items-center">
<nav id="navbar" class="navbar">
<ul>
<li><a class="nav-link scrollto" href="index.php#hero">Home</a></li>
<li><a class="nav-link scrollto" href="index.php#about">About</a></li>
<li><a class="nav-link scrollto" href="index.php#services">Platforms</a></li>
<li class="dropdown">
<a href="#"><span>TV Guide</span> <i class="bi bi-chevron-down"></i></a>
<ul>
<li><a href="schedule_usa.php">Sport Plus U.S.A.</a></li>
<li><a href="schedule_aus.php">Sport Plus Australia</a></li>
<li><a href="schedule_euro.php">Sport Plus Europe</a></li>
</ul>
</li>
<li><a class="nav-link scrollto" href="index.php#contact">Contact</a></li>
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav>
<!-- .navbar -->
</header>
<!-- End Header -->
<main id="main">
<!-- ======= My Resume Section ======= -->
<section id="resume" class="resume">
<div class="container">
<div class="section-title">
<span>Sport Plus U.S.A.</span>
<h2>Sport Plus U.S.A.</h2>
<!--<p>Sit sint consectetur velit quisquam cupiditate impedit suscipit alias</p>-->
</div>
<div class="btn-wrap">
<a href="schedule_usa.php?d=2026-01-18" class="btn-buy">&laquo;</a>
<!--<a href="schedule_usa.php?d=2026-01-18" class="btn-buy">SUN 18/01</a>-->
<a href="#" class="btn-buy">MON 19/01</a>
<!--<a href="schedule_usa.php?d=2026-01-20" class="btn-buy">TUE 20/01</a>-->
<a href="schedule_usa.php?d=2026-01-20" class="btn-buy">&raquo;</a>
</div>
<div class="row d-flex align-items-center justify-content-center">
<div class="col-lg-4">
<!--<h3 class="resume-title">MONDAY 19/01</h3>-->
<h5 class="section-title">*New York time</h5>
</div>
</div>
</div>
</section>
<!-- End My Resume Section -->
</main>
<!-- End #main -->
<!-- ======= Footer ======= -->
<footer id="footer">
<div class="container">
<img src="assets/img/logosp.png" class="img-fluid" style="width: 30%" alt="" />
<p>Premium sports experience</p>
<div class="social-links">
<!--<a href="#" class="twitter"><i class="bx bxl-twitter"></i></a>-->
<a href="https://www.facebook.com/sportplustv" class="facebook" target="_blank"
><i class="bx bxl-facebook"></i
></a>
<a href="https://www.instagram.com/thesportplustv/" class="instagram" target="_blank"
><i class="bx bxl-instagram"></i
></a>
<!--<a href="#" class="google-plus"><i class="bx bxl-skype"></i></a>-->
<!--<a href="#" class="linkedin"><i class="bx bxl-linkedin"></i></a>-->
</div>
<div class="copyright">
&copy; Copyright 2025<strong><span> Sport Plus</span></strong
>. All Rights Reserved
</div>
<div class="credits">
<!-- All the links in the footer should remain intact. -->
<!-- You can delete the links only if you purchased the pro version. -->
<!-- Licensing information: https://bootstrapmade.com/license/ -->
<!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/laura-free-creative-bootstrap-theme/ -->
Development by
<a href="https://egiannopo.com/" target="_blank" style="color: #28b3ae !important">EG</a
>&nbsp;&nbsp;&nbsp;Theme by
<a href="https://bootstrapmade.com/" target="_blank" style="color: #28b3ae !important"
>BootstrapMade</a
>
</div>
</div>
</footer>
<!-- End Footer -->
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"
><i class="bi bi-arrow-up-short"></i
></a>
<!-- Vendor JS Files -->
<script src="assets/vendor/purecounter/purecounter_vanilla.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/glightbox/js/glightbox.min.js"></script>
<script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="assets/vendor/swiper/swiper-bundle.min.js"></script>
<script src="assets/vendor/waypoints/noframework.waypoints.js"></script>
<!--<script src="assets/vendor/php-email-form/validate.js"></script>-->
<!-- Template Main JS File -->
<script src="assets/js/main.js"></script>
</body>
</html>

View file

@ -0,0 +1,17 @@
# thesportplus.com
US: https://www.thesportplus.com/schedule_usa.php
Australia: https://www.thesportplus.com/schedule_aus.php
Europe: https://www.thesportplus.com/schedule_euro.php
### Download the guide
```sh
npm run grab --- --site=thesportplus.com
```
### Test
```sh
npm test --- thesportplus.com
```

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<channel site="thesportplus.com" lang="en" xmltv_id="" site_id="usa">Sport Plus U.S.A.</channel>
<channel site="thesportplus.com" lang="en" xmltv_id="" site_id="aus">Sport Plus Australia</channel>
<channel site="thesportplus.com" lang="en" xmltv_id="" site_id="euro">Sport Plus Europe</channel>
</channels>

View file

@ -0,0 +1,73 @@
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)
const timezones = {
usa: 'America/New_York',
aus: 'Australia/Sydney',
euro: 'UTC'
}
module.exports = {
site: 'thesportplus.com',
days: 2,
url({ channel, date }) {
return `https://www.thesportplus.com/schedule_${channel.site_id}.php?d=${date.format(
'YYYY-MM-DD'
)}`
},
parser({ content, date, channel }) {
const programs = []
const items = parseItems(content)
items.forEach(item => {
const $item = cheerio.load(item)
const prev = programs[programs.length - 1]
let start = parseStart($item, date, channel)
if (!start) return
if (prev) {
if (start.isBefore(prev.start) && start.hour() < 12) {
start = start.add(1, 'd')
date = date.add(1, 'd')
}
prev.stop = start
}
const stop = start.add(1, 'h')
programs.push({
title: parseTitle($item),
description: parseDescription($item),
start,
stop
})
})
return programs
}
}
function parseTitle($item) {
return $item('h5:last').text().trim()
}
function parseDescription($item) {
return $item('p').text().trim()
}
function parseStart($item, date, channel) {
const timezone = timezones[channel.site_id]
const time = $item('h4').text().trim()
const dateString = `${date.format('YYYY-MM-DD')} ${time}`
return dayjs.tz(dateString, 'YYYY-MM-DD HH:mm', timezone)
}
function parseItems(content) {
const $ = cheerio.load(content)
return $('.resume-item').toArray()
}

View file

@ -0,0 +1,50 @@
const { parser, url } = require('./thesportplus.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('2025-01-19', 'YYYY-MM-DD').startOf('d')
const channel = {
site_id: 'usa',
xmltv_id: 'SportPlusUSA.us'
}
it('can generate valid url', () => {
expect(url({ channel, date })).toBe('https://www.thesportplus.com/schedule_usa.php?d=2025-01-19')
})
it('can parse response', () => {
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.html'))
const results = parser({ content, date, channel }).map(p => {
p.start = p.start.toJSON()
p.stop = p.stop.toJSON()
return p
})
expect(results.length).toBe(13)
expect(results[0]).toMatchObject({
start: '2025-01-19T06:00:00.000Z',
stop: '2025-01-19T08:00:00.000Z',
title: 'ASTERAS vs ATROMITOS',
description: 'Super League Season 24-25 MD 4'
})
expect(results[12]).toMatchObject({
start: '2025-01-20T04:00:00.000Z',
stop: '2025-01-20T05:00:00.000Z',
title: 'SPORTSHOW',
description: 'Super League'
})
})
it('can handle empty guide', () => {
const results = parser({
date,
channel,
content: fs.readFileSync(path.resolve(__dirname, '__data__/no_content.html'))
})
expect(results).toMatchObject([])
})