xmltv/grab/pt test.conf, 1.6, 1.7 tv_grab_pt, 1.51, 1.52
Geoff <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/pt
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17418
Modified Files:
test.conf tv_grab_pt
Log Message:
(major) fix for source site changes (now www.nos.pt)
Index: tv_grab_pt
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/pt/tv_grab_pt,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** tv_grab_pt 8 May 2014 12:39:52 -0000 1.51
--- tv_grab_pt 19 May 2014 14:36:01 -0000 1.52
***************
*** 110,119 ****
;
! my $DOMAIN = 'zon.pt';
my $SOURCE_URL = "http://www.$DOMAIN";
# Attributes of the root element in output.
my $HEAD = { 'source-info-url' => "http://$DOMAIN/",
! 'source-data-url' => "http://www.$DOMAIN/tv/guiaTV/",
'generator-info-name' => 'XMLTV',
'generator-info-url' => 'http://xmltv.org/',
--- 110,119 ----
;
! my $DOMAIN = 'nos.pt';
my $SOURCE_URL = "http://www.$DOMAIN";
# Attributes of the root element in output.
my $HEAD = { 'source-info-url' => "http://$DOMAIN/",
! 'source-data-url' => "http://www.$DOMAIN/particulares/televisao/guia-tv/",
'generator-info-name' => 'XMLTV',
'generator-info-url' => 'http://xmltv.org/',
***************
*** 170,174 ****
our $first_day = ($opt_offset || 0);
our $last_day = $first_day + $opt_days;
! die 'cannot grab more than one week ahead' if $first_day >= 7 || $last_day >= 7;
my $mode = XMLTV::Mode::mode('grab', # default
--- 170,174 ----
our $first_day = ($opt_offset || 0);
our $last_day = $first_day + $opt_days;
! die 'cannot grab more than one week ahead' if $first_day >= 7 || $last_day > 7;
my $mode = XMLTV::Mode::mode('grab', # default
***************
*** 274,278 ****
# grabber.
#
! if (/^channel:?\s+(.+)\.zon\.pt\s*$/) {
my $ch_did = $1;
die if not defined $ch_did;
--- 274,278 ----
# grabber.
#
! if (/^channel:?\s+(.+)\.nos\.pt\s*$/) {
my $ch_did = $1;
die if not defined $ch_did;
***************
*** 331,337 ****
- my $some=0;
- our $today_offset;
-
# time limits for grab
my $today_date = DateTime->today(time_zone => 'Europe/Lisbon');
--- 331,334 ----
***************
*** 340,343 ****
--- 337,341 ----
print STDERR "\n start/end grab: $grab_start $grab_stop \n" if $opt_debug;
+ my $some=0;
foreach my $ch_did (@channels) {
#skip legacy channels...
***************
*** 428,443 ****
}
- sub today_offset {
- return $today_offset if defined($today_offset);
-
- #we need to find today index
- my $td = get_nice_tree $HEAD->{"source-data-url"}, \&tidy;
- my $days_s = $td->find_by_attribute( 'id', 'SelectedDay' );
- my $td_offset = $days_s->attr('value');
- $today_offset = $td_offset;
- $td->delete;
- return $today_offset;
- }
-
sub process_table {
my ($ch_xmltv_id) = @_;
--- 426,429 ----
***************
*** 451,455 ****
# http://www.zon.pt/tv/guiaTV/Pages/Guia-TV-programacao.aspx?channelSigla=5
! my $url = $HEAD->{'source-data-url'} . 'Pages/Guia-TV-programacao.aspx?channelSigla='.$ch_xmltv_id;
print STDERR " URL= $url \n" if $opt_debug;
t $url;
--- 437,443 ----
# http://www.zon.pt/tv/guiaTV/Pages/Guia-TV-programacao.aspx?channelSigla=5
! # 2014-05-19 http://www.nos.pt/particulares/televisao/guia-tv/Pages/channel.aspx?channel=5
! #
! my $url = $HEAD->{'source-data-url'} . 'Pages/channel.aspx?channel='.$ch_xmltv_id;
print STDERR " URL= $url \n" if $opt_debug;
t $url;
***************
*** 695,699 ****
# retrieve channels via a dummy call to the schedule page
# http://www.zon.pt/tv/guiaTV/Pages/GuiaTV.aspx
! my $url = $HEAD->{'source-data-url'} . 'Pages/GuiaTV.aspx';
t $url;
--- 683,688 ----
# retrieve channels via a dummy call to the schedule page
# http://www.zon.pt/tv/guiaTV/Pages/GuiaTV.aspx
! # 2014-05-19 http://www.nos.pt/particulares/televisao/guia-tv/Pages/default.aspx
! my $url = $HEAD->{'source-data-url'} . 'Pages/default.aspx';
t $url;
***************
*** 702,712 ****
# <div id="channels-list-container">
# <ul id="channels-list-slider">
! # <li><span class="channel-number">001</span>
! # <span class="channel-logo">
! # <a href='/tv/guiaTV/Pages/Guia-TV-programacao.aspx?channelSigla=5' title='RTP 1'>
! # <img src='/EPGChannelImages/RTP1.png' alt='logótipo RTP 1' />
! # </a>
! # </span>
# </li>
#
if ( my $h = $tree->look_down('_tag' => 'div', 'id' => 'channels-list-container') ) {
--- 691,712 ----
# <div id="channels-list-container">
# <ul id="channels-list-slider">
! # <li>
! # <span class="channel-number">001</span>
! # <span class="channel-logo">
! # <a href='/tv/guiaTV/Pages/Guia-TV-programacao.aspx?channelSigla=5' title='RTP 1'>
! # <img src='/EPGChannelImages/RTP1.png' alt='logótipo RTP 1' />
! # </a>
! # </span>
# </li>
+ # 2014-05-19
+ # <li>
+ # <span class="channel-logo">
+ # <a href="/particulares/televisao/guia-tv/Pages/channel.aspx?channel=5" title="RTP 1">
+ # <img src="//images.nos.pt/EPGChannelImages/RTP1.png" alt="logótipo RTP 1">
+ # </a>
+ # </span>
+ # <span class="channel-number">001</span>
+ # </li>
+ # http://images.nos.pt/EPGChannelImages/RTP1.png
#
if ( my $h = $tree->look_down('_tag' => 'div', 'id' => 'channels-list-container') ) {
***************
*** 717,732 ****
if ( my $h4 = $elem->look_down('_tag' => 'a') ) {
$channel_name = toUTF8( $h4->attr('title') );
! ($channel_id) = $h4->attr('href') =~ /channelSigla=(\d*)/;
}
if ( my $h4 = $elem->look_down('_tag' => 'img') ) {
! $channel_logo = $SOURCE_URL . $h4->attr('src');
}
# store the channel
my $ch =
{
! 'channel-name' => $channel_name,
! 'display-name' => [ [ $channel_name, $LANG ] ],
! 'id' => $channel_id.'.'.$DOMAIN,
! 'icon' => [ { 'src' => $channel_logo } ],
};
$channels{$channel_id} = $ch;
--- 717,732 ----
if ( my $h4 = $elem->look_down('_tag' => 'a') ) {
$channel_name = toUTF8( $h4->attr('title') );
! ($channel_id) = $h4->attr('href') =~ /channel=(\d*)/;
}
if ( my $h4 = $elem->look_down('_tag' => 'img') ) {
! $channel_logo = 'http:' . $h4->attr('src');
}
# store the channel
my $ch =
{
! 'channel-name' => $channel_name,
! 'display-name' => [ [ $channel_name, $LANG ] ],
! 'id' => $channel_id.'.'.$DOMAIN,
! 'icon' => [ { 'src' => $channel_logo } ],
};
$channels{$channel_id} = $ch;
Index: test.conf
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/pt/test.conf,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test.conf 7 May 2014 16:24:33 -0000 1.6
--- test.conf 19 May 2014 14:36:01 -0000 1.7
***************
*** 1,178 ****
! #channel 10.zon.pt
! #channel 100.zon.pt
! #channel 101.zon.pt
! #channel 105.zon.pt
! #channel 108.zon.pt
! #channel 109.zon.pt
! #channel 11.zon.pt
! #channel 111.zon.pt
! #channel 112.zon.pt
! #channel 113.zon.pt
! #channel 114.zon.pt
! #channel 115.zon.pt
! #channel 116.zon.pt
! #channel 117.zon.pt
! #channel 118.zon.pt
! #channel 119.zon.pt
! #channel 120.zon.pt
! #channel 121.zon.pt
! #channel 123.zon.pt
! #channel 124.zon.pt
! #channel 125.zon.pt
! #channel 127.zon.pt
! #channel 129.zon.pt
! #channel 13.zon.pt
! #channel 130.zon.pt
! #channel 132.zon.pt
! #channel 133.zon.pt
! #channel 134.zon.pt
! #channel 135.zon.pt
! #channel 136.zon.pt
! #channel 137.zon.pt
! #channel 138.zon.pt
! #channel 139.zon.pt
! #channel 14.zon.pt
! #channel 141.zon.pt
! #channel 142.zon.pt
! #channel 143.zon.pt
! #channel 144.zon.pt
! #channel 145.zon.pt
! #channel 148.zon.pt
! #channel 149.zon.pt
! #channel 15.zon.pt
! channel 16.zon.pt
! #channel 160.zon.pt
! #channel 161.zon.pt
! #channel 162.zon.pt
! #channel 163.zon.pt
! #channel 164.zon.pt
! #channel 165.zon.pt
! #channel 167.zon.pt
! #channel 168.zon.pt
! #channel 169.zon.pt
! #channel 17.zon.pt
! #channel 171.zon.pt
! #channel 172.zon.pt
! #channel 174.zon.pt
! #channel 175.zon.pt
! #channel 176.zon.pt
! #channel 177.zon.pt
! #channel 178.zon.pt
! #channel 179.zon.pt
! #channel 18.zon.pt
! #channel 180.zon.pt
! #channel 181.zon.pt
! #channel 182.zon.pt
! #channel 183.zon.pt
! #channel 184.zon.pt
! #channel 185.zon.pt
! #channel 186.zon.pt
! #channel 187.zon.pt
! #channel 188.zon.pt
! #channel 19.zon.pt
! #channel 190.zon.pt
! #channel 191.zon.pt
! #channel 194.zon.pt
! #channel 196.zon.pt
! #channel 20.zon.pt
! #channel 200.zon.pt
! #channel 201.zon.pt
! #channel 202.zon.pt
! #channel 203.zon.pt
! #channel 21.zon.pt
! #channel 22.zon.pt
! #channel 221.zon.pt
! #channel 222.zon.pt
! #channel 223.zon.pt
! #channel 224.zon.pt
! #channel 226.zon.pt
! #channel 229.zon.pt
! #channel 23.zon.pt
! #channel 230.zon.pt
! #channel 232.zon.pt
! #channel 233.zon.pt
! #channel 234.zon.pt
! #channel 235.zon.pt
! #channel 236.zon.pt
! #channel 237.zon.pt
! #channel 24.zon.pt
! #channel 242.zon.pt
! #channel 243.zon.pt
! #channel 244.zon.pt
! #channel 245.zon.pt
! #channel 246.zon.pt
! #channel 247.zon.pt
! #channel 248.zon.pt
! #channel 249.zon.pt
! #channel 25.zon.pt
! #channel 250.zon.pt
! #channel 251.zon.pt
! #channel 252.zon.pt
! #channel 26.zon.pt
! #channel 27.zon.pt
! #channel 28.zon.pt
! #channel 29.zon.pt
! channel 3.zon.pt
! #channel 30.zon.pt
! #channel 31.zon.pt
! #channel 33.zon.pt
! #channel 34.zon.pt
! #channel 35.zon.pt
! #channel 36.zon.pt
! #channel 37.zon.pt
! channel 38.zon.pt
! #channel 39.zon.pt
! #channel 4.zon.pt
! #channel 40.zon.pt
! #channel 41.zon.pt
! #channel 42.zon.pt
! #channel 44.zon.pt
! #channel 45.zon.pt
! #channel 46.zon.pt
! #channel 47.zon.pt
! #channel 48.zon.pt
! #channel 49.zon.pt
! channel 5.zon.pt
! #channel 50.zon.pt
! #channel 51.zon.pt
! #channel 52.zon.pt
! #channel 53.zon.pt
! #channel 54.zon.pt
! #channel 55.zon.pt
! #channel 57.zon.pt
! #channel 58.zon.pt
! #channel 59.zon.pt
! #channel 60.zon.pt
! #channel 61.zon.pt
! #channel 62.zon.pt
! #channel 64.zon.pt
! #channel 65.zon.pt
! #channel 66.zon.pt
! #channel 67.zon.pt
! #channel 69.zon.pt
! #channel 7.zon.pt
! #channel 70.zon.pt
! #channel 71.zon.pt
! #channel 72.zon.pt
! #channel 74.zon.pt
! #channel 75.zon.pt
! #channel 76.zon.pt
! #channel 77.zon.pt
! #channel 78.zon.pt
! #channel 79.zon.pt
! #channel 8.zon.pt
! #channel 80.zon.pt
! #channel 81.zon.pt
! #channel 82.zon.pt
! #channel 83.zon.pt
! #channel 84.zon.pt
! #channel 85.zon.pt
! #channel 86.zon.pt
! #channel 9.zon.pt
! #channel 90.zon.pt
! #channel 91.zon.pt
! #channel 92.zon.pt
! #channel 93.zon.pt
! #channel 94.zon.pt
! #channel 95.zon.pt
! #channel 98.zon.pt
--- 1,178 ----
! #channel 10.nos.pt
! #channel 100.nos.pt
! #channel 101.nos.pt
! #channel 105.nos.pt
! #channel 108.nos.pt
! #channel 109.nos.pt
! #channel 11.nos.pt
! #channel 111.nos.pt
! #channel 112.nos.pt
! #channel 113.nos.pt
! #channel 114.nos.pt
! #channel 115.nos.pt
! #channel 116.nos.pt
! #channel 117.nos.pt
! #channel 118.nos.pt
! #channel 119.nos.pt
! #channel 120.nos.pt
! #channel 121.nos.pt
! #channel 123.nos.pt
! #channel 124.nos.pt
! #channel 125.nos.pt
! #channel 127.nos.pt
! #channel 129.nos.pt
! #channel 13.nos.pt
! #channel 130.nos.pt
! #channel 132.nos.pt
! #channel 133.nos.pt
! #channel 134.nos.pt
! #channel 135.nos.pt
! #channel 136.nos.pt
! #channel 137.nos.pt
! #channel 138.nos.pt
! #channel 139.nos.pt
! #channel 14.nos.pt
! #channel 141.nos.pt
! #channel 142.nos.pt
! #channel 143.nos.pt
! #channel 144.nos.pt
! #channel 145.nos.pt
! #channel 148.nos.pt
! #channel 149.nos.pt
! #channel 15.nos.pt
! channel 16.nos.pt
! #channel 160.nos.pt
! #channel 161.nos.pt
! #channel 162.nos.pt
! #channel 163.nos.pt
! #channel 164.nos.pt
! #channel 165.nos.pt
! #channel 167.nos.pt
! #channel 168.nos.pt
! #channel 169.nos.pt
! #channel 17.nos.pt
! #channel 171.nos.pt
! #channel 172.nos.pt
! #channel 174.nos.pt
! #channel 175.nos.pt
! #channel 176.nos.pt
! #channel 177.nos.pt
! #channel 178.nos.pt
! #channel 179.nos.pt
! #channel 18.nos.pt
! #channel 180.nos.pt
! #channel 181.nos.pt
! #channel 182.nos.pt
! #channel 183.nos.pt
! #channel 184.nos.pt
! #channel 185.nos.pt
! #channel 186.nos.pt
! #channel 187.nos.pt
! #channel 188.nos.pt
! #channel 19.nos.pt
! #channel 190.nos.pt
! #channel 191.nos.pt
! #channel 194.nos.pt
! #channel 196.nos.pt
! #channel 20.nos.pt
! #channel 200.nos.pt
! #channel 201.nos.pt
! #channel 202.nos.pt
! #channel 203.nos.pt
! #channel 21.nos.pt
! #channel 22.nos.pt
! #channel 221.nos.pt
! #channel 222.nos.pt
! #channel 223.nos.pt
! #channel 224.nos.pt
! #channel 226.nos.pt
! #channel 229.nos.pt
! #channel 23.nos.pt
! #channel 230.nos.pt
! #channel 232.nos.pt
! #channel 233.nos.pt
! #channel 234.nos.pt
! #channel 235.nos.pt
! #channel 236.nos.pt
! #channel 237.nos.pt
! #channel 24.nos.pt
! #channel 242.nos.pt
! #channel 243.nos.pt
! #channel 244.nos.pt
! #channel 245.nos.pt
! #channel 246.nos.pt
! #channel 247.nos.pt
! #channel 248.nos.pt
! #channel 249.nos.pt
! #channel 25.nos.pt
! #channel 250.nos.pt
! #channel 251.nos.pt
! #channel 252.nos.pt
! #channel 26.nos.pt
! #channel 27.nos.pt
! #channel 28.nos.pt
! #channel 29.nos.pt
! channel 3.nos.pt
! #channel 30.nos.pt
! #channel 31.nos.pt
! #channel 33.nos.pt
! #channel 34.nos.pt
! #channel 35.nos.pt
! #channel 36.nos.pt
! #channel 37.nos.pt
! channel 38.nos.pt
! #channel 39.nos.pt
! #channel 4.nos.pt
! #channel 40.nos.pt
! #channel 41.nos.pt
! #channel 42.nos.pt
! #channel 44.nos.pt
! #channel 45.nos.pt
! #channel 46.nos.pt
! #channel 47.nos.pt
! #channel 48.nos.pt
! #channel 49.nos.pt
! channel 5.nos.pt
! #channel 50.nos.pt
! #channel 51.nos.pt
! #channel 52.nos.pt
! #channel 53.nos.pt
! #channel 54.nos.pt
! #channel 55.nos.pt
! #channel 57.nos.pt
! #channel 58.nos.pt
! #channel 59.nos.pt
! #channel 60.nos.pt
! #channel 61.nos.pt
! #channel 62.nos.pt
! #channel 64.nos.pt
! #channel 65.nos.pt
! #channel 66.nos.pt
! #channel 67.nos.pt
! #channel 69.nos.pt
! #channel 7.nos.pt
! #channel 70.nos.pt
! #channel 71.nos.pt
! #channel 72.nos.pt
! #channel 74.nos.pt
! #channel 75.nos.pt
! #channel 76.nos.pt
! #channel 77.nos.pt
! #channel 78.nos.pt
! #channel 79.nos.pt
! #channel 8.nos.pt
! #channel 80.nos.pt
! #channel 81.nos.pt
! #channel 82.nos.pt
! #channel 83.nos.pt
! #channel 84.nos.pt
! #channel 85.nos.pt
! #channel 86.nos.pt
! #channel 9.nos.pt
! #channel 90.nos.pt
! #channel 91.nos.pt
! #channel 92.nos.pt
! #channel 93.nos.pt
! #channel 94.nos.pt
! #channel 95.nos.pt
! #channel 98.nos.pt
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
xmltv-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmltv-commit