mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
improve firstmedia
This commit is contained in:
parent
66360221ff
commit
751fb1e7a5
2 changed files with 8 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue