Monday, October 27, 2008

XMLTV no longer welcome in Belgium

It might look like a strange title, but I'll explain and you'll understand. Mediacenter software like Mythtv use a script for grabbing there program guide. Most use xmltv. In Belgium it uses the tv_grab_be script, which is made to use the site www.teveblad.be.

Until a few weeks ago, there was no problem at all. But then suddenly it stopped grabbing the info. Fast enough, I found out teveblad had blocked the user agent xmltv. But there was a workaround. Make teveblad believe the user agent isn't xmltv, but IE.

This worked for a week or two. But then it stopped working again. Don't know why, but I started looking for some other solution. Teveblad added a little suffix to the listings:

The usage of software to extract data from this website for personal use or for display on other websites (screen scraping) is prohibited

Now the developer for tv_grab_be removed the teveblad part because of xmltv's general policy, which only allows the use of a script when the site allows such sort of screen scraping. So no more xmltv in the flemish part of Belgium.

So I really had to find another solution, because EPG is an importent part of Mythtv. Mc2xml seems to have that solution. This program does the trick. Downloading only takes about 15 sec. Man it really is fast.

All you need to do is run the program with your zipcode, then your are asked the listings you want ( I took Telenet analogue cable listings). When you use mythfilldatabase, it even fills out the right frequencies. How nice is that.

This very noon, I will change my cronjobs and start using mc2xml.

PS: yes I'm now using the Microsoft media Center service to keep my Linux Mythtv going. Let's hope they don't start blocking.


Share/Save/Bookmark

8 comments:

Anonymous said...

Or you can still use the guide from mythportal.be
It also uses teveblad.be as source, but seems to have circumvented the block.

JO3RI said...

To be honest, I don't think they have a solution. There guide is empty too.

Anonymous said...

JO3RI,

any idea how to pull the correct channels for In.Di, now it is still working with FreeToAir channels like I'm using right now???

I tried the 'Cable' selection of mc2xml and set be for country and 2140 for postal code, but it puts in all sorts of channels I don't see in my original channel listings...

If you know, let me know ;)

JO3RI said...

you'll have to do several things. First make the right choise (0-8). My choise is 8 (telenet analogue cable) When you use mythtfilldatabase to import the xml it will create new channels.

Now you could copy paste the xmlID's you need to de channels you made before and remove all the new channels. then you'll have to make a mc2mxl.chl file and put list only the channels you need.

Then when you run mc2xml, it will make an xml file with only those channels you have put in the list. Because you gave your own channels the new xmlID (something with microsoft in it), your channels will be updated with the EPG info.

Anonymous said...

I tried adapting the script on the mythtvtalk.com page, but I have a couple of issues with it.

Did you succeed putting in the mc2xml output into your mythtv epg database, and doing updates of it through a cron job?

Let me know, you know where to find me ;)

JO3RI said...

Yep, That is what happens every night here at home. A cronjob runs mc2xml outputting a xml file and then it runs mythfilldatabase to import that xml.

Bram I don't seem to have your email address.

Christian_Smet said...

Need some help..
It all works manually.. crontab doesn't run the mc2xml .. however mythfilldatabase runs. Here is my update.sh

pcxpert@MythMan:/mc2xml$ cat update.sh
cd mc2xml
echo ok1 >/tmp/mc2xml.log
sh mc2xml -g 9140 -c be >>/tmp/mc2xml.log 2>&1
echo ok2 >>/tmp/mc2xml.log
mythfilldatabase --refresh-all --file 1 /mc2xml/xmltv.xml
mythfilldatabase --refresh-all --file 2 /mc2xml/xmltv.xml


a tail from the mc2xml.log shows the mc2xml wants to now (0-8) mine is 8. When I run manually...the question only came the first time...

JO3RI said...

My script looks like this:

/home/mythtv/mc2xml/mc2xml -c be -g 9220 -o /home/mythtv/.mythtv/tvblad.xml
/usr/bin/mythfilldatabase --file 1 /home/mythtv/.mythtv/tvblad.xml --quiet

I placed mc2xml in /home/mythtv/mc2xml
You have to use full pathnames !!!

If you want to reconfigure mc2xml, you'll have to remove mc2xml.dat

Don't forget to replace 9220, with your own postcode.