How to retrieve, parse, and search in french TV program?

Search for a channel or a program using french TV program and execute some actions with the result, let’s do it!

First at all, retrieve source from ProgramTv repo :

$ git clone

It will help you to parse the TV program guide


$ ./run.php "documentaire"
# Ok j'ai mis titre du documentaire sur france5
$ ./run.php "scènes de ménage"
# Ok j'ai mis scènes de ménage sur m6


Edit the callback.php file, to customize what to do with result, for example, call the freebox remote endpoint:

    // callback.php

    * Other properties available:
    * $program->title The program title
    * $program->channel_name The program channel name
    * $program->channel The program channel number

Auto update the feed

Just exec the file :


You can add it to your crontab file using crontab -e and adding the following line:

@daily /home/pi/program-tv/


The channels file is helpfull to match channel names and numbers. Commenting a channel will exclude it from the search.

To conclude…

However, you know… I never watch TV because of shitty programs … So… useless ¯\(ツ)

Seen on ProgramTv repo

Written on April 2, 2019