higuita / vodafone.pt-xmltv

xmltv grabber for Vodafone Portugal
GNU General Public License v3.0
10 stars 2 forks source link

Service no longer available. #5

Closed rogamaral closed 1 day ago

rogamaral commented 2 weeks ago

Hi higuita. The service appears to be no longer available. Do you know of any alternatives?

Thanks.

higuita commented 2 weeks ago

Hi yes, i know, vodafone killed the old EPG servers, they replaced all the apps and now use a different service for the new apps.

I already have a method to get the EPG and images, but the problem is that the getting the available channels require vodafone authentication via a complex method... worse case we may need to use a static list of channels that we update manually from time to time, but that is a awful solution

I'm also trying to check what the vodafone box use, that API should be simpler and stable... but yep, for now it is probably better to use the tv_grab_pt_meo until i solve this

rogamaral commented 2 weeks ago

I don't use XMLTV. I came here looking for an API to get a list of channels and programming to use in my application.

I followed your suggestion to use the api used in https://github.com/XMLTV/xmltv/blob/master/grab/pt_meo/tv_grab_pt_meo but without success.

I don't know Perl, maybe that's why I may not have understood well how the api works.

This is what I arrived at:

curl --location 'https://www.meo.pt/_layouts/15/Ptsi.Isites.GridTv/GridTvMng.asmx/getGridAnon' \
--header 'Content-Type: application/json' \
--data '{
    "service": "allchannels"
}'

I am a C# man, so:

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.meo.pt/_layouts/15/Ptsi.Isites.GridTv/GridTvMng.asmx/getGridAnon");
var content = new StringContent("{\"service\": \"allchannels\"}", Encoding.UTF8, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

If you can help me, I'd appreciate it. Thanks.

higuita commented 1 day ago

Ok, i just finished building a new xmltv exporter, i will upload it in a few minutes. Try it if it doesn't work, and as you are a C# man, you can try this other project, free allows 20 or 30 channels, if you donate, you can get much more. It is not opensource sadly: http://webgrabplus.com/

This and the webgrab++ output xmltv files, but you can check the latest script how to call the vodafone api and get the json. Sadly, i found no way to grab the channel ID list other than checking the browser app, so right now i have a hardcoded channel.list

rogamaral commented 1 day ago

Thanks. The new api is very simple to use.

higuita commented 1 day ago

yep, other than the channel list, that one increased a lot the difficulty. the epg data itself is much simpler