Malaysia TV Program Guide grabber for Mythtv

First of all have to determine the sourceid from.. the MySQL.. and make it look like this one..

# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3905
Server version: 5.0.45 Source distribution
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql> use mythconverg;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> select sourceid,name,xmltvid from channel;
+----------+------+-----------------------+
| sourceid | name | xmltvid               |
+----------+------+-----------------------+
|        2 | TV1  | M038-101.astro.com.my | 
|        2 | TV3  | M046-103.astro.com.my | 
|        2 | NTV7 | M036-107.astro.com.my | 
|        2 | 8TV  | M057-708.astro.com.my | 
|        2 |      |                       | 
|        2 | TV9  |                       | 
+----------+------+-----------------------+
6 rows in set (0.00 sec)

and this the bash file that i use to run it daily..

#!/bin/sh
#DATE=`date '+%d/%B/%y'
DATE=`date '+%Y%m%d'`
TOMORROW=`date -d1day '+%Y%m%d'`
cd /home/mythtv/mythguide/update
# TV1
wget http://mythastro.hostrator.com/M038-101.astro.com.my_$DATE.xml --output-document M038-101.astro.com.my_$DATE.xml
sed s/-0800/+0800/g M038-101.astro.com.my_$DATE.xml > M038-101.astro.com.my1_$DATE.xml
mythfilldatabase --update --refresh-all --file 2 M038-101.astro.com.my1_$DATE.xml


wget http://mythastro.hostrator.com/M038-101.astro.com.my_$TOMORROW.xml --output-document M038-101.astro.com.my_$TOMORROW.xml 
sed s/-0800/+0800/g M038-101.astro.com.my_$TOMORROW.xml >  M038-101.astro.com.my1_$TOMORROW.xml
mythfilldatabase --update --refresh-all --file 2 M038-101.astro.com.my1_$TOMORROW.xml

# TV3
wget http://mythastro.hostrator.com/M046-103.astro.com.my_$DATE.xml --output-document M046-103.astro.com.my_$DATE.xml
sed s/-0800/+0800/g M046-103.astro.com.my_$DATE.xml > M046-103.astro.com.my1_$DATE.xml 
mythfilldatabase --update --refresh-all --file 2 M046-103.astro.com.my1_$DATE.xml

wget http://mythastro.hostrator.com/M046-103.astro.com.my_$TOMORROW.xml --output-document M046-103.astro.com.my_$TOMORROW.xml
sed s/-0800/+0800/g M046-103.astro.com.my_$TOMORROW.xml > M046-103.astro.com.my1_$TOMORROW.xml
mythfilldatabase --update --refresh-all --file 2 M046-103.astro.com.my1_$TOMORROW.xml
# NTV7
wget http://mythastro.hostrator.com/M036-107.astro.com.my_$DATE.xml --output-document M036-107.astro.com.my_$DATE.xml
sed s/-0800/+0800/g M036-107.astro.com.my_$DATE.xml > M036-107.astro.com.my1_$DATE.xml

mythfilldatabase --update --refresh-all --file 2 M036-107.astro.com.my1_$DATE.xml 

wget http://mythastro.hostrator.com/M036-107.astro.com.my_$TOMORROW.xml --output-document M036-107.astro.com.my_$TOMORROW.xml 
sed s/-0800/+0800/g M036-107.astro.com.my_$TOMORROW.xml >  M036-107.astro.com.my1_$TOMORROW.xml
mythfilldatabase --update --refresh-all --file 2 M036-107.astro.com.my1_$TOMORROW.xml

# 8TV
wget http://mythastro.hostrator.com/M057-708.astro.com.my_$DATE.xml --output-document M057-708.astro.com.my_$DATE.xml
sed s/-0800/+0800/g M057-708.astro.com.my_$DATE.xml >  M036-107.astro.com.my1_$TOMORROW.xml

mythfilldatabase --update --refresh-all --file 2 M057-708.astro.com.my1_$DATE.xml


wget http://mythastro.hostrator.com/M057-708.astro.com.my_$TOMORROW.xml --output-document M057-708.astro.com.my_$TOMORROW.xml 
sed s/-0800/+0800/g M057-708.astro.com.my_$TOMORROW.xml > M057-708.astro.com.my1_$TOMORROW.xml
mythfilldatabase --update --refresh-all --file 2 M057-708.astro.com.my1_$TOMORROW.xml

-bash-3.2$ crontab -l
* 5 * * * /home/mythtv/bin/mythguide-update2.sh > /dev/null

it might be buggy at the moment..
but at least..I got something like this..

program-listing
heheh..mouse over the program will tell the program description..

program-listing-mouse-over

click on it to record..
mythtv-record-lah

nice..

thanks to the XML uploader..

p/s: all this stuff only viable after a great journey earlier… 😎

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Like

Related Post

24 Responses

  1. ahstod says:

    … how long did you manage to get away without installing this one? 😎

    Reply
  2. namran says:

    approximately within 48hours.. hahaha.. (very slow-pace mode) as the file exist since..

    Mon Mar 9 15:28:31 2009 UTC (32 hours, 49 minutes ago) by ..

    quite weird when most of the item are just disappeared..
    .. at first thought some config problem.. removing the whole project directory and re-checkout.. still the same..
    then only figured one by one.. lol..

    Reply
  3. Andre says:

    Worked for me. Many thanks!

    Reply
    • HawkEYE says:

      @Andre : you’re welcome.. hopefully it help those in need.

      Reply
  4. Spyder461 says:

    I’m still having this problem. If done the yum install php-xml, but I still get the error about missing DomDocument class. I have read some posts that talk about executing a enable lib-xml extension command, but when I do this command, I get a error that lib-xml and extension is not a builtin command. Any suggestions would be appreciated.

    Reply
  5. danyal says:

    really very helpful it works

    Reply
  6. sachin says:

    Good, It worked

    Reply
  7. nszumowski says:

    Awesome! Everywhere else I was looking referenced libxml2 which I had already installed. This fixed my issue!

    Reply
  8. nico says:

    Awesome! thanks so much.

    Reply
  9. battisti says:

    Thx, after a lot of hours spend in the source the problem was in the server! 🙁

    Reply
  10. dungkal says:

    Updating the php-xml (note: it had already been installed long before the problem cropped up) on my CentOS server did the trick.

    Thanks for the help.

    Reply
  11. wika says:

    Thanks, it worked !!

    Reply
  12. rc says:

    Just a note, if you’re on centos and you had to do a custom install of php 5.3, yum install php53-xml will do the trick

    Reply
  13. elliot says:

    @rc – thank you!

    Reply
  14. Andrea says:

    Woooow, thank you!
    U save my ass…

    Reply
  15. littleguy says:

    This worked great, thanks!

    Reply
  16. mark says:

    Thank you , was baffled with this error, your post saved the day

    Reply
  17. Smoker says:

    It worked for me like a charm. Thank you verry much.

    Reply
  18. Thanga says:

    ANSWER IS HANDY :)THANKS A LOT

    Reply
  19. axlotl says:

    Thank you, sir.

    Reply
  20. dduane says:

    I also had to add the line:
    extension=dom.so
    to my php.ini file and restart apache. I’m using Fedora 16.

    Reply
  21. vb says:

    Thanks. saved a lot of time. Had that issue with owncloud

    Reply
  22. khyox says:

    Thank you very much indeed! It solved my issue viewing the internal wiki syntax page with dokuwiki running over lighttpd in Scientific Linux.

    Reply
  23. Andre says:

    Muito obrigado valeu muito o bizu de instalar esta yum install php-xml, excelente ajuda, estava precisando muito

    Reply

Anything to add?

X