xmltv/grab/il tv_grab_il,1.26,1.27
Geoff <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/il
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30501
Modified Files:
tv_grab_il
Log Message:
output the channels in the same order as found on the website
Index: tv_grab_il
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/il/tv_grab_il,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** tv_grab_il 24 May 2014 15:49:20 -0000 1.26
--- tv_grab_il 24 May 2014 15:51:33 -0000 1.27
***************
*** 181,185 ****
--- 181,188 ----
# Browse through the downloaded list of channels and map them to a hash XMLTV::Writer would understand
+ # Kludge the hash keys so Writer outputs them in the same order as on the source website :-)
+ my $i=0;
foreach my $channel (@channels) {
+ $i++; my $i2 = substr("0000$i", -5);
if ($channel->as_text()) {
my ($id) = $channel->attr('href') =~ /$channel_link_id/;
***************
*** 192,201 ****
$icon = $icon->attr('src') if $icon;
! $channels->{"$id.tv.walla.co.il"} = {
id => "$id.tv.walla.co.il",
'display-name' => [[ encode( 'utf-8', decode( 'windows-1255', $channel->as_text())), 'he' ]],
url => [ $channel->attr('href') ]
};
! $channels->{"$id.tv.walla.co.il"}->{icon} = [ {src => ($icon || '')} ] if ($icon)
}
--- 195,204 ----
$icon = $icon->attr('src') if $icon;
! $channels->{"$i2.$id.tv.walla.co.il"} = {
id => "$id.tv.walla.co.il",
'display-name' => [[ encode( 'utf-8', decode( 'windows-1255', $channel->as_text())), 'he' ]],
url => [ $channel->attr('href') ]
};
! $channels->{"$i2.$id.tv.walla.co.il"}->{icon} = [ {src => ($icon || '')} ] if ($icon)
}
------------------------------------------------------------------------------
"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