K-vanc / Tempest-EPG-Generator

The fastest XMLTV formatted EPG Generator with GUI and the lowest memory usage
https://hub.docker.com/r/kvanc/tempest_epg
Other
108 stars 19 forks source link

Siteconfig only grab past epg, without current and upcoming epg #24

Closed RyanRiz closed 1 year ago

RyanRiz commented 1 year ago

Site: Indihometv.com Siteconfigs: indihometv.com_0.siteconfig.php Debugged Channel: NET.

So currently I try to grab epg from indihometv.com site with tempest, and it's working. After that, I try to put in on my iptv player, but it not showing any epg. So I got confused here. Then, I try to debugging siteconfig and compare epg with origin site. Apparently the siteconfig only grab past epg, and not current and upcoming epg. Can you help me out?

I attach some screenshot if it needed: Screenshot epg from original site: Screenshot from 2023-03-29 19-12-20 Screenshot from 2023-03-29 19-15-06

Screenshot epg from siteconfig debugger: Screenshot from 2023-03-29 19-12-36

K-vanc commented 1 year ago

Hi and thanks for using Tempest.

Sorry for my late reply. I was away from pc and I still am but I was able to check problem you mentioned from my mobile. This time calculation may be abit confusing so I will try to explain step-by-step. First of all, that siteconfig has only 1 day of available data and it is always today. Second thing, i am using unix timestamp for calculation show times on that siteconfig and timestamps also contain date information. If show is belongs to previous day, Tempest will automaticly discard it based on your local time settings. Now, I will mention where is timestamp and it is converted to what. I tested same channel you mentioned(net) and let's check first show(github is not currently allowing me paste screenshot so I will copy/paste);

[1] => href="https://www.indihometv.com/tvod/net/1680024600/1680029880/18304926/makan-enak"class="d-flex align-items-center schedule-item active">

00:30 - 01:58

Makan Enak

In this block, start time is 00:30 without any date so it must be today as 2023-03-29 00:30 +0700(Indonesia Time as +0700) but I am using hidden timestamp there as show time which is "1680024600". If you convert this string into human readible time, it will be 2023-03-28 17:30 +0000(unix timestamps are always UTC as +0000). Now it looks like It is yesterday's show as you mentioned, correct??

But actually These 2 dates are equal when their offset's are aligned;

2023-03-28 17:30 +0000 <=> 2023-03-29 00:30 +0700

So Tempest's calculated date is correct as below;

Start Time :

[1] => 20230328173000 +0000

At this point, problem is related with your iptv player. Even today, Still there are tons of iptv players which cannot properly calculate different time offsets. For example Kodi takes everything as +0000 for years regardless of set offset in xml file so if you have several time offsets on epg file, it all will be a mess. To avoid this, Tempest has a built-in time converter. If you set it, all show times will be recalculated as per defined timezone or offset and resulting file will have only 1 offset. You can try it by setting "Time Converter" as

Asia/Jakarta

On Tempest Configurator under File Configuration tab. When you rerun grabbing, all shows will be recalculated with +0700 offset. I hope this will be enough to solve your problem

K-vanc commented 1 year ago

While checking website on my pc, I have noticed show structure is changing when a show is passed by time and causing that siteconfig is missing some shows so I updated. It is working without timestamp now(because not exists for upcoming shows) and using only start/stop hour with Asia/Jakarta time offset. Please redownload and check again. Maybe it was related with your problem

K-vanc commented 1 year ago

I think this is absolutely what you asked by saying past day epg. it is not past day epg, same day but completed shows epg. When I made this siteconfig, most of the shows were completed and I didnt notice structure is different and changing for completed and upcoming shows. Thats why it was not listed on your iptv player because you grabbed only completed shows. Now updated siteconfig will download both started and not yet started shows so you will be able to see all without any extra setting.

EDIT: I read again your findings and you didnt say past day but past epg. I understood as it is grabbing previous days so sorry bro. It is probably side-effects of my fastening :smile:

RyanRiz commented 1 year ago

Yes, that's what I meant. Sorry for my bad language, it's working very well right now. Btw I'm fastening too, so Happy Ramadan for you brother. :smile:

RyanRiz commented 1 year ago

And I noticed that only few channel was generated from siteconfig. So I did experiment adding channel site id manually from other channel xml source like webgrab, and it works very good. It can grab epg up to 134 channel.

Screenshot: image

K-vanc commented 1 year ago

good to hear it is resolved, bro and also Happy Ramadan to you.

Let me check website again. I could be fast-coded the channel creation part also when I made the siteconfig😄

K-vanc commented 1 year ago

Done! Now generating 139 channels. Please redownload updated

RyanRiz commented 1 year ago

Thank you so much! Since all complete I will close this issue, thanks for helping me out :smiley:

K-vanc commented 1 year ago

Welcome, bro. Enjoy Tempest 😃

RyanRiz commented 1 year ago

Site: Indihometv.com Siteconfigs: indihometv.com_0.siteconfig.php Hi again. Sorry to reopen this issue since I think it's probably still related.

I got into another problem again. I'll try my best to explain it. So, It's the middle of the night, the day is already passed. Probably about 01:00 AM (Jakarta Time).

Original site has alredy renew epg for today (March 31). I tried to renew epg by generating new epg. But, since the previous day (March 30) had some epg left, tempest only grab that left over epg from previous day (March 30) and ignore today new epg (March 31). Are I supposed to generate it in certain time to get the lates epg? Since it's only grab epg for only 1 day.

Today (March 31) latest epg is seen when I debugging siteconfig: Screenshot from 2023-03-31 01-07-08

It's said only grab 2 shows: image

K-vanc commented 1 year ago

Hi. I understood well but actually it is not an issue. When you run that siteconfig, Tempest is creating a date string based on your machine's time setting and capturing block starting with this date string. As example, currently my time is almost 22:00 and date is still 30-03-2023. So when I run that siteconfig, Tempest is first calculating my date as 2023-03-30 and looking website's source to find block which starts with this date. Then after another Tempest feature is filtering shows till the next day 03:00 am as overflowing shows. Now, most of the shows are already over and only 2 shows are remained from early in next day as blow picture which is completely ok as per my design :)

Screenshot_20230330-213939_Chrome.jpg

Anyway, if you want to capture all existing shows in any time, you can modify siteconfig on Siteconfig Editor by choosing indihometv siteconfig and set "Maximum Days" as 2 under Site Options tab and save.

Screenshot_20230330-215233_Chrome.jpg

Now when you grab for 2 days, it will capture all existing shows

Screenshot_20230330-215747_Chrome.jpg

EDIT: I checked again on my mobile and I think setting Maximum Days as 2.1, will be better solution.

RyanRiz commented 1 year ago

Thank you for your response, I understand it very well.

I set "Maximum Days" to 2.1 just like you said. But when I try generate it, it's always generate only for 1 day Screenshot_2023-03-31-03-23-14-229_com android chrome Screenshot_2023-03-31-03-26-11-527-edit_com android chrome

K-vanc commented 1 year ago

Yes because you are still requesting 1 day only :) Both in Debugger and in your Tempest Configuration file, you need to increase timespan value for 2 days request.

Screenshot_20230330-223401_Chrome.jpg

RyanRiz commented 1 year ago

Oh you were right, I didn't know I supposed to do that. I'm new at this, so I don't had much experience. :sweat_smile:

Anyway It's all good now. Thanks again bro :+1:

K-vanc commented 1 year ago

You are welcome. I asked you to do yourself because it is pretty easy 😅

Joke aside, I am away from pc now, and also tomorrow I will not have access So just test It and let me know if you notice any problem. I made an alternative version for 2days show grabbing on my mobile but usually not sharing before properly testing on pc. If you find any problem, i may give it to you for advance testing but probably this solution will work fine