linting fixes all files

This commit is contained in:
theofficialomega
2025-07-27 16:30:07 +02:00
parent d6884090df
commit 9d2cf08e2e
3 changed files with 18 additions and 18 deletions

View File

@@ -7,12 +7,12 @@ dayjs.extend(utc)
dayjs.extend(customParseFormat)
const headers = {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"accept-language": "en",
"sec-fetch-site": "same-origin",
"sec-fetch-user": "?1",
"upgrade-insecure-requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
'accept-language': 'en',
'sec-fetch-site': 'same-origin',
'sec-fetch-user': '?1',
'upgrade-insecure-requests': '1',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36'
}
module.exports = {

View File

@@ -4,7 +4,7 @@ module.exports = {
site: 'tataplay.com',
days: 1,
url({ channel, date }) {
url({ date }) {
return `https://tm.tapi.videoready.tv/content-detail/pub/api/v2/channels/schedule?date=${date.format('DD-MM-YYYY')}`
},

View File

@@ -14,7 +14,7 @@ module.exports = {
items.forEach(item => {
const prev = programs[programs.length - 1]
const $item = cheerio.load(item)
const episodeInfo = parseEP($item);
const episodeInfo = parseEP($item)
let start = parseStart($item, date)
if (!start) return
if (prev) {
@@ -68,15 +68,15 @@ function parseTitle($item) {
return $item('h3').text().trim()
}
function parseEP($item){
const text = $item('h6').text().trim();
const match = text.match(/Season\s+(\d+)\s*•\s*Episode\s+(\d+)/i);
const text = $item('h6').text().trim()
const match = text.match(/Season\s+(\d+)\s*•\s*Episode\s+(\d+)/i)
if (!match) return {}; // Return an empty object if no match, so properties are undefined later
if (!match) return {} // Return an empty object if no match, so properties are undefined later
const season = parseInt(match[1], 10);
const episode = parseInt(match[2], 10);
const season = parseInt(match[1], 10)
const episode = parseInt(match[2], 10)
return { season, episode }; // Return an object with season and episode
return { season, episode } // Return an object with season and episode
}
function parseSubtitle($item) {
@@ -84,13 +84,13 @@ function parseSubtitle($item) {
}
function parsePreviously($item){
const h3Text = $item('h3').text().trim();
const isNewShow = /New$/.test(h3Text);
const h3Text = $item('h3').text().trim()
const isNewShow = /New$/.test(h3Text)
if (isNewShow) {
return null;
return null
} else {
return {};
return {}
}
}