Jump to content


Photo

EPG for IPTV channels


  • Please log in to reply
681 replies to this topic

Re: EPG for IPTV channels #321 doglover

  • Rytec EPG Team
  • 17,016 posts

+639
Excellent

Posted 17 August 2020 - 07:18

What I published still works on my machine.

So did you obtain he token?

Placed the token in the webserver folder?

Place the PHP script in the webserver folder?

 

Replaced http://192.168.178.30 with the IP address or URL of you webserver in the siteIni?


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG for IPTV channels #322 brkonny

  • Member
  • 24 posts

0
Neutral

Posted 17 August 2020 - 09:21

I tried to obtain the token from the website, as you've said on WG++ forum a long time ago.

I placed it manually in the PHP script and it showed something like No index error.

I placed the PHP script in webserver folder and changed the IP in INI file so that it matches my circumstances.

 

I didn't understand that I should've placed the token in the webserver folder. In which way am I supposed to do it?

Thanks in advance!


Edited by brkonny, 17 August 2020 - 09:25.


Re: EPG for IPTV channels #323 doglover

  • Rytec EPG Team
  • 17,016 posts

+639
Excellent

Posted 17 August 2020 - 09:45

The token changes every day, so you should obtain it everyday again.

 

I am running this statement once a day on linux with a cronjob (on windows it is similar)

curl "https://api-web.ug-be.cdn.united.cloud/oauth/token?grant_type=client_credentials" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0" -H "Accept: application/json, text/plain, */*" -H "Accept-Language: nl,en-US;q=0.7,en;q=0.3" --compressed -H "Referer: https://epg.sbb.rs/503" -H "Authorization: Basic MjdlMTFmNWUtODhlMi00OGU0LWJkNDItOGUxNWFiYmM2NmY1OjEyejJzMXJ3bXdhZmsxMGNkdzl0cjloOWFjYjZwdjJoZDhscXZ0aGc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Origin: https://epg.sbb.rs" -H "Connection: keep-alive" --data "" -o /volume1/web/sbb.rs

As you see there is a mistake on the github (which I corrected now)

 

At the end of the above statement you can see:  -o /volume1/web/sbb.rs

-o denotes the output of the curl statement.

/volume1/web/  is the folder of my webserver.

and sbb.rs is the token filename (was telemach.ba - which is the sister website for which I originally wrote the procedure)

 

curl is then retrieving the token and writing it in /volume1/web/sbb.rs


Edited by doglover, 17 August 2020 - 09:45.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG for IPTV channels #324 brkonny

  • Member
  • 24 posts

0
Neutral

Posted 17 August 2020 - 10:06

Ok, so I've tried what you've send me now and I still get the errors. I use Windows 10, so I've changed the code you've provided to the one that I'm looking for (just set the curl.exe path instead of curl only). I still get the same kind of errors. 

 

Here's the code I've tried to use right now:

"C:\Users\xxxxxxx\Desktop\Playlist\new astras boi\ad\sbb nu\curl-7.71.1-win64-mingw\curl-7.71.1-win64-mingw\bin\curl.exe" "https://api-web.ug-be.cdn.united.cloud/oauth/token?grant_type=client_credentials" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0" -H "Accept: application/json, text/plain, */*" -H "Accept-Language: nl,en-US;q=0.7,en;q=0.3" --compressed -H "Referer: https://epg.sbb.rs/503" -H "Authorization: Basic MjdlMTFmNWUtODhlMi00OGU0LWJkNDItOGUxNWFiYmM2NmY1OjEyejJzMXJ3bXdhZmsxMGNkdzl0cjloOWFjYjZwdjJoZDhscXZ0aGc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Origin: https://epg.sbb.rs" -H "Connection: keep-alive" --data "" -o https://xxxxxxxxxxxx.000webhostapp.com/epg/ 

Errors I get are these:

0Warning: Failed to create the file
Warning: https:/xxxxxxxx.000webhostapp.com/epg: Invalid argument 
0curl: (23) Failure writing output to destination
This is my webserver folder:
kN71rx6.png

 

What should I do?

Thanks in advance!



Re: EPG for IPTV channels #325 doglover

  • Rytec EPG Team
  • 17,016 posts

+639
Excellent

Posted 17 August 2020 - 10:09

change:

-o https://xxxxxxxxxxxx.000webhostapp.com/epg/

 

 

 

to

-o https://xxxxxxxxxxxx.000webhostapp.com/epg/sbb.rs

 


Edited by doglover, 17 August 2020 - 10:09.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG for IPTV channels #326 brkonny

  • Member
  • 24 posts

0
Neutral

Posted 17 August 2020 - 10:12

No, again the same...

 0Warning: Failed to create the file
Warning: https://xxxxxxxxxxx.000webhostapp.com/epg/sbb.rs: Invalid argument
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (23) Failure writing output to destination

Is it maybe problem with permissions on my webserver?

Also, due I'm new user, unfortunately, I have only 1 more post, so I'll be able to answer today after 20, even though I can answer it instantly. Sorry for that....


Edited by brkonny, 17 August 2020 - 10:13.


Re: EPG for IPTV channels #327 doglover

  • Rytec EPG Team
  • 17,016 posts

+639
Excellent

Posted 17 August 2020 - 10:31

You have to resolve this problem of writing the file though.

you probably do not have permission to write to this location.  It is a real website.

I am running the webserver on my own NAS, and I can write to it.

 

I will have a look of an alternate way of providing the token to the PHP script.  It is a bit more complicated for me, but probably easier for you.

PS: will be later this afternoon


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG for IPTV channels #328 doglover

  • Rytec EPG Team
  • 17,016 posts

+639
Excellent

Posted 17 August 2020 - 13:16

OK.  Try this.

Made modified SiteIni and PHP script.

In the SiteIni replace the http://192.168.178.30 (all occurances) with the URL or IP address of your webserver.

Also you need curl.

 

Windows:
You will need curl for Windows:  https://curl.haxx.se/windows/

Download it, and copy the files from the bin folder to the WG++ working folder.
This is the folder containing the Webgrab++.config.xml file.

 

You probably have it already, so just copy the contents of the curl bin folder to WG++ work folder.

 

In your WG++ config file change the sbb.rs refs to sbb.rs2 refs.

(You can simply replce sbb.rs with sbb.rs2)

Attached Files


Edited by doglover, 17 August 2020 - 14:01.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG for IPTV channels #329 brkonny

  • Member
  • 24 posts

0
Neutral

Posted 17 August 2020 - 16:47

Thanks a lot man, I really appreciate it! It works flawlessly! Everything works great, except the thing that it is slow, but I don't care about that, since it has all the info I need! Time doesn't matter to me at all. Also, why I really needed this SiteIni is because some channels are exclusive for this provider. Again, thanks a lot and keep doing this!



Re: EPG for IPTV channels #330 doglover

  • Rytec EPG Team
  • 17,016 posts

+639
Excellent

Posted 17 August 2020 - 20:00

sbb.rs is very slow.  Nothing I can do about.  If you want to the index-only version it is quicker.  But that SiteIni should also be changed with modifications made in sbb.rs2

Attached Files


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG for IPTV channels #331 brkonny

  • Member
  • 24 posts

0
Neutral

Posted 17 August 2020 - 20:40

OK, so that Ini does speed up the process by a lot. But here's the thing: do I need to manually update token every day I'm grabbing or does PHP or INI do it automatically?



Re: EPG for IPTV channels #332 brkonny

  • Member
  • 24 posts

0
Neutral

Posted 17 August 2020 - 22:26

Also, I'll need PHP and INI for telemach.ba, I tried changing the script you've provided but still I don't get anything. Basically, I've changed everything containing sbb.rs to telemach.ba (I think that is good enough approach, until now) and when I want to get the channel list I get empty XML file. What else should be changed? I tried to manually change the token, but that didn't help either. Also, I tried entering the following URL in browser: 

https://xxxxxxxxxxx.000webhostapp.com/epg/telemach_ba.php?reqtype=3

 and I always get this kind of error:

Warning: file_get_contents(telemach.ba): failed to open stream: No such file or directory in /storage/ssd5/793/13068793/public_html/epg/telemach_ba.php on line 18
{"status":401,"error":"unauthorized","errorMessage":"Full authentication is required to access this resource","messageId":268165210}1

What else should be changed?

Thanks in advance, and I hope I don't take much time!



Re: EPG for IPTV channels #333 doglover

  • Rytec EPG Team
  • 17,016 posts

+639
Excellent

Posted 18 August 2020 - 07:14

The token is retrieved each time you download a channel with these new versions.  A situation I was trying to avoid with the old version.

 

The telemach procedure is similar but there are differences.

Will do this later today.

 

PS: Compare the result of the full version with the index-only version.  In a lot of cases the full version delivers not much more data.  In those cases the choice is easy.


Edited by doglover, 18 August 2020 - 07:17.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG for IPTV channels #334 brkonny

  • Member
  • 24 posts

0
Neutral

Posted 18 August 2020 - 10:41

I compared two of provided files and I found index-only good enough. It is actually very fast, I didn't expect it to be that fast. It provides enough data. Thanks for it! Hope that you won't have any problems while making Telemach.BA Ini!



Re: EPG for IPTV channels #335 doglover

  • Rytec EPG Team
  • 17,016 posts

+639
Excellent

Posted 18 August 2020 - 12:27

Here you go/

 

Attached Files


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG for IPTV channels #336 brkonny

  • Member
  • 24 posts

0
Neutral

Posted 18 August 2020 - 14:21

Ok, so thank you anyways, but I cannot get it working. It constantly says that there are no shows in indexpage:

(   1/1   ) TELEMACH.BA -- chan. (xmltv_id=N1 HD (BH)) -- mode Force
no shows in indexpage!

I changed the IPs in SiteIni and placed PHP in my webserver folder, but it shows this error. What am I doing wrong?

Also, it doesn't matter which channel from this provider do I put in, it always shows the same error.


Edited by brkonny, 18 August 2020 - 14:23.


Re: EPG for IPTV channels #337 doglover

  • Rytec EPG Team
  • 17,016 posts

+639
Excellent

Posted 18 August 2020 - 15:16

We have a difference:

[  Info  ] (   1/3   ) TELEMACH.BA2.INDEX-ONLY -- chan. (xmltv_id=N1 HD (BH)) -- mode Force
[  Debug ]    skipped : show that happened before 'today' @ 17/08/2020 22:00
[  Debug ]    skipped : show that happened before 'today' @ 17/08/2020 22:30
[  Debug ]    skipped : show that happened before 'today' @ 17/08/2020 23:30
[  Info  ] 0.00 sec/update
[  Info  ]    Summary for update of       N1 HD (BH)
[  Info  ]      missing shows added       0
[  Info  ]      changed shows updated     0
[  Info  ]      new shows added           41
[  Info  ]      unchanged shows inspected 0
[  Info  ]      total after update        41
[  Info  ]      elapstime / updated show  0.00 seconds
[  Debug ]
[  Info  ] (   2/3   ) TELEMACH.BA2.INDEX-ONLY -- chan. (xmltv_id=BHT 1) -- mode Force
[  Debug ]    skipped : show that happened before 'today' @ 17/08/2020 21:15
[  Debug ]    skipped : show that happened before 'today' @ 17/08/2020 22:05
[  Debug ]    skipped : show that happened before 'today' @ 17/08/2020 23:20
[  Info  ]
[  Info  ]    Summary for update of       BHT 1
[  Info  ]      missing shows added       0
[  Info  ]      changed shows updated     0
[  Info  ]      new shows added           33
[  Info  ]      unchanged shows inspected 0
[  Info  ]      total after update        33[  Debug ]
[  Info  ] (   3/3   ) TELEMACH.BA2.INDEX-ONLY -- chan. (xmltv_id=Federalna TV) -- mode Force
[  Debug ]    skipped : show that happened before 'today' @ 17/08/2020 20:40
[  Debug ]    skipped : show that happened before 'today' @ 17/08/2020 22:10
[  Debug ]    skipped : show that happened before 'today' @ 17/08/2020 23:35
[  Info  ] 0.00 sec/update
[  Info  ]    Summary for update of       Federalna TV
[  Info  ]      missing shows added       0
[  Info  ]      changed shows updated     0
[  Info  ]      new shows added           34
[  Info  ]      unchanged shows inspected 0
[  Info  ]      total after update        34[  Info  ]      elapstime / updated show  0.00 seconds
[  Debug ]
[  Debug ] 108 shows in 3 channels
[  Debug ] 0 updated shows
[  Debug ] 108 new shows added

I wonder why.  We have to work here with tokens and this can be tricky.

 

At the moment I do not have a clue.


Edited by doglover, 18 August 2020 - 15:36.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG for IPTV channels #338 brkonny

  • Member
  • 24 posts

0
Neutral

Posted 18 August 2020 - 15:20

I got some idea connecting C# and PHP. I saw that PHP can read content of some file, and that C# can easily get authorization header value. We can make a program where C# gets the token value and then we can append it to some file stored on webserver. Then, when PHP script is being used, we can just get content of file that C# made and use it in the script. I think that is not a bad approach. I'm not too familiar with PHP, that's the biggest problem. If I were, I would've already helped you... What do you think about this approach?



Re: EPG for IPTV channels #339 doglover

  • Rytec EPG Team
  • 17,016 posts

+639
Excellent

Posted 18 August 2020 - 15:41

It is fine.

 

Actually the PHP script can read already a file containing the token:

 

$tok = file_get_contents('telemach.ba', true);

But I had to abandon this approach, because you cannot save the token to the webserver automatically on a daily basis.


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: EPG for IPTV channels #340 brkonny

  • Member
  • 24 posts

0
Neutral

Posted 18 August 2020 - 17:59

Oh, I just found on 000webhost that they have integrated Cron Jobs. Would that help?na4f9fv.png




3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users