You are here

Is it possible to capture epg from the source?

6 posts / 0 new
Last post
sam564
Offline
Donator
Joined: 5 years
Last seen: 1 month
Is it possible to capture epg from the source?

There is a new epg source for Brazil from the site: https://epg.pw/areas/br/epg.html?lang=en, just out of curiosity to look at the documentation here on the site I managed to capture events from the site but as it is not developed and I don't know how to adjust, it is capturing few events, some durations quase 24 hours, otherwise it would be some .ini adjustment that I don't know how to do.

But in any way you can give a thought if it is possible, it is not for that I am grateful.

sam564
Offline
Donator
Joined: 5 years
Last seen: 1 month
sam564 wrote:

There is a new epg source for Brazil from the site: https://epg.pw/areas/br/epg.html?lang=en, just out of curiosity to look at the documentation here on the site I managed to capture events from the site but as it is not developed and I don't know how to adjust, it is capturing few events, some durations quase 24 hours, otherwise it would be some .ini adjustment that I don't know how to do.

But in any way you can give a thought if it is possible, it is not for that I am grateful.

 

It is very difficult to give an answer like: No, is it not possible to breed?

 

LicNotRequired
Offline
Donator
Joined: 3 months
Last seen: 5 hours

u do know they supply download links you can use directly in your epg viewer?
look for the xmltv feed page.
this is nothing more than a modifed version of the merg-xmltv-utc.ini thats in the misc folder.
i dont know why but whoever owns the site uses lang="zh" for everything.
i assume they must be chinese.
 

Attachments: 
sam564
Offline
Donator
Joined: 5 years
Last seen: 1 month

Actually, I managed to adjust some things in the .ini file; it captures events, but it needs improvement. At the moment, I don't know if it's possible to capture more things like seasons, etc. As I said, I only looked at the documentation and went to test it. As soon as possible, I'll study it more to see what can be done or if it's just a limitation of the site.

Attachments: 
LicNotRequired
Offline
Donator
Joined: 3 months
Last seen: 5 hours

use the xmltv feed page.u can view the epg in your browser.
Free EPG source suitable for IPTV | FREE EPG
cant get data that doesnt exist.

i see title,description,maybe audio(stereo),date(useless as its a epg creation date i think,not actual date of the show)
there is no subtitle,episode,credits,ect data.
what your doing is the hard way(scrapping the data),use the xmltv feed page url's.
the files i provided use it.

 

LicNotRequired
Offline
Donator
Joined: 3 months
Last seen: 5 hours

few things with your ini
1. when the page loads its a multiday epg,maxdays=10.1
    means 10 days epg on a single page doesnt break anything if there is less that 10 days available.
2. scope.range {(splitindex)|end}
    xxxx
    end_scope
    this is for your showsplit only.
    everything from index_start(all the elements) belong on their own scope which is
    scope.range {(indexshowdetails)|end}
    index_start ...
    index_title ....
    all index_xxxx elements go here
    end_scope
3. you dont need pattern="HH:mm",pattern is used when webgrab doesnt reconize the date/time format.
    in this case webgrab would reconize the time pattern without issues,it doesnt break anything to have it though.
4. substutions dont work in webgrab code..
    example
    index_episode.modify {replace(type=regex)|"Season\s*(\d+)\s*Episode\s*(\d+)"|S$1 E$2}
    your have to do it the opposite in 2 steps...
    index_episode.modify {replace(type=regex)|"(?:Season\|Temporada)"|S}
    index_episode.modify {replace(type=regex)|"(?:Episode\|Epis[oó]dio)"|E}
    alternately episode can use the pattern="xxxx"
    the | is special in webgrab,it uses it internally for multi value elements as a separator so u must escape it in webgrab regex.
    you can also rip the info right from the title,no need for index_temp_1
    index_episode.modify {substring(pattern="Season 'S1' Episode 'E1'""Temporada "S1' Episodio 'E1'""Temporada "S1' Episódio 'E1'""S'S1'E'E1'""S'S1'/E'E1'" type=regex)|'index_title' "(Season\s*\d+\s*Episode\s*\d+\|Temporada\s*\d+\s*Epis[oó]dio\s*\d+\|S\s*\d+\s*/\s*E\s*\d+\|S\s*\d+\s*E\s*\d+)"}
    you dont have to worry about handling spaces in season/episode info,they are ignored.
    doing it with pattern you also do not need to do regex replaces as i said above.
    adding the patterns and webgrab will convert everything to Sx Ey for onscreen or xmltn_ns(see below)
    adding the pattern="xxxx""xxxxx"xxxx" also allows you to convert from onscreen to xmltv_ns format but setting the episodesystem=xxx on the site {xxx} line.onscreen and xmltv_ns as the 2 valid settings.default is onscreen.
 

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl