mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Fix linter issues in sites/
This commit is contained in:
parent
d6d20b6413
commit
5df982bb7c
129 changed files with 3316 additions and 3226 deletions
|
@ -43,7 +43,7 @@ module.exports = {
|
|||
const pages = Array.from(Array(totalPages).keys())
|
||||
for (let page of pages) {
|
||||
const data = await axios
|
||||
.get(`https://mts.rs/oec/epg/program`, {
|
||||
.get('https://mts.rs/oec/epg/program', {
|
||||
params: { page, date: dayjs().format('YYYY-MM-DD') },
|
||||
headers: {
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
|
@ -67,7 +67,7 @@ module.exports = {
|
|||
|
||||
async function getTotalPageCount() {
|
||||
const data = await axios
|
||||
.get(`https://mts.rs/oec/epg/program`, {
|
||||
.get('https://mts.rs/oec/epg/program', {
|
||||
params: { page: 0, date: dayjs().format('YYYY-MM-DD') },
|
||||
headers: {
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
|
@ -84,8 +84,8 @@ function parseContent(content, channel) {
|
|||
let data
|
||||
try {
|
||||
data = JSON.parse(content)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
} catch {
|
||||
return []
|
||||
}
|
||||
if (!data || !data.channels || !data.channels.length) return null
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue