mirror of
https://github.com/iptv-org/epg
synced 2025-12-18 11:27:06 -05:00
improve firstmedia
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
const dayjs = require("dayjs");
|
||||
const timezone = require("dayjs/plugin/timezone");
|
||||
const utc = require('dayjs/plugin/utc');
|
||||
|
||||
dayjs.extend(timezone);
|
||||
dayjs.extend(utc);
|
||||
|
||||
module.exports = {
|
||||
site: "firstmedia.com",
|
||||
days: 2,
|
||||
days: 1,
|
||||
url: function ({ channel, date }) {
|
||||
return `https://www.firstmedia.com/ajax/schedule?date=${
|
||||
date.format("DD/MM/YYYY")
|
||||
return `https://www.firstmedia.com/ajax/schedule?date=${date.format("DD/MM/YYYY")
|
||||
}&channel=${channel.site_id}&start_time=1&end_time=24&need_channels=0`;
|
||||
},
|
||||
parser: function ({ content, channel }) {
|
||||
@@ -29,7 +31,7 @@ module.exports = {
|
||||
};
|
||||
|
||||
function parseItems(content, channel) {
|
||||
return JSON.parse(content).entries[channel];
|
||||
return JSON.parse(content.trim()).entries[channel];
|
||||
}
|
||||
|
||||
function parseTitle(item) {
|
||||
|
||||
Reference in New Issue
Block a user