|
Update for tv_grab_se for additional description: msg#00098tv.xmltv.devel
Hello XMLTV'ers. Being a very satisfied user I thought I should contribute with something. :-) This is my first patch(ever) so please be gentle. tv_grab_se does not currently support <desc> for swedish TV3(and other Viasat channels). The homepage has the information but the grabber does not do the extra pageloading required. This is a diff-file(diff -u) to tv_grab_se which adds description support for Swedish TV3(and maybe all other swedish viasat channels current supported. Not tested though). I'm not saying this is the absolute best way to add the support but you have to start somewhere. :) The state of the patch is: It works for me It has one drawback and that is it will increase the load on the webbserver. This is because we have to grab a new webpage for all programs inte the webbguide. If the webpage has 20 programs then tv_grab_se will fetch atleast 21 webpages. What I did: Added two new subroutines: * get_html_desc_viasat Does almost the same as get_html_viasat except it builds the URL differently(almost a raw cut and paste). * get_data_desc_viasat Lots of cut and paste here too from get_data_viasat but does searching differently. * changed get_data_viasat This to add the extra webpageloading required. For me it does what it supposed to do. Not long-time tested. Don't think it will break the other viasat channel(that is using the get_data_viasat subroutine) but not tested. There is some things I'm not so sure about and might need some more eyes on. One of the things I have "hardwritten" into the code is the way the description page is intepreted. I take for granted that the page only contains one description. The xml search filter I use to get the nodelist is: "//tr/td[div/\@class='head'" Most of the time this is not a problem and I assumed that this will only appear once. The problem is that sometimes there is no description and on this I return a warning. Should it return a warning? There is some programs that does not have a description so the warning is not valid. I have also noted that sometimes the search returns more than one hit. I haven't looked at it in depth so I'm not sure if it's two descriptions or only one. I return a warning for this too, but like above. It might not be a warning. The last thing I'm not so sure about because I haven't studied the XMLTV DTD. Can you have both <desc> and <url> at the same time? Anyway.. Here is my work and I hope some of it will be used. I want my descriptions! :)
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ xmltv-Bugs-1063444 ] Time out bug?: 00098, SourceForge.net |
|---|---|
| Next by Date: | [ xmltv-Bugs-1063444 ] Time out bug?: 00098, SourceForge.net |
| Previous by Thread: | New version of tv_grab_fr2i: 00098, centraladmin |
| Next by Thread: | Re: Update for tv_grab_se for additional description: 00098, Mattias Holmlund |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |