mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Made the getskyepg.pl script of the 'sky' plugin send a user agent message to the server
This commit is contained in:
parent
3e0659a10a
commit
bab6955557
5
HISTORY
5
HISTORY
@ -4990,3 +4990,8 @@ Video Disk Recorder Revision History
|
||||
|
||||
- Some improvements to the man pages (thanks to Ville Skyttä).
|
||||
- Fixed a possible segfault in cSkins::Message() (thanks to Udo Richter).
|
||||
- Made the getskyepg.pl script of the 'sky' plugin send a user agent message to
|
||||
the server, according to the rules at http://bleb.org/tv/data/listings.
|
||||
If your version of 'wget' doesn't support the -U option to set the user agent,
|
||||
use the new option -U of getskyepg.pl to have the information added to the URL
|
||||
as a query string.
|
||||
|
@ -45,3 +45,11 @@ VDR Plugin 'sky' Revision History
|
||||
2006-03-26: Version 0.3.5
|
||||
|
||||
- Fixed format string handling.
|
||||
|
||||
2006-12-01: Version 0.3.5 (version number not increased)
|
||||
|
||||
- Made the getskyepg.pl script send a user agent message to
|
||||
the server, according to the rules at http://bleb.org/tv/data/listings.
|
||||
If your version of 'wget' doesn't support the -U option to set the user agent,
|
||||
use the new option -U of getskyepg.pl to have the information added to the URL
|
||||
as a query string.
|
||||
|
@ -8,7 +8,7 @@
|
||||
#
|
||||
# See the README file for copyright information and how to reach the author.
|
||||
#
|
||||
# $Id: getskyepg.pl 1.4 2006/01/08 10:21:32 kls Exp $
|
||||
# $Id: getskyepg.pl 1.5 2006/12/01 14:38:00 kls Exp $
|
||||
|
||||
use Getopt::Std;
|
||||
use Time::Local;
|
||||
@ -21,18 +21,29 @@ Options: -c filename channel config file name (default: channels.conf.sky
|
||||
-p port SVDRP port number (default: 2001)
|
||||
-S source channel source (default: S28.2E)
|
||||
-D days days to get EPG for (1..7, default: 2)
|
||||
-U use this if your version of 'wget' doesn't support -U
|
||||
};
|
||||
|
||||
die $Usage if (!getopts("c:d:D:hp:S:") || $opt_h);
|
||||
die $Usage if (!getopts("c:d:D:hp:S:U") || $opt_h);
|
||||
|
||||
$Conf = $opt_c || "channels.conf.sky";
|
||||
$Dest = $opt_d || "localhost";
|
||||
$Port = $opt_p || 2001;
|
||||
$Source = $opt_S || "S28.2E";
|
||||
$Days = $opt_D || 2;
|
||||
$User = $opt_U;
|
||||
|
||||
# See "Rules for using this data" on http://bleb.org/tv/data/listings.
|
||||
# In case you modify this script in a way that changes its behavior
|
||||
# towards the www.bleb.org website, please replace 'vdrbugs@cadsoft.de'
|
||||
# with your own email address! That way Andrew Flegg <andrew@bleb.org>,
|
||||
# who runs that web site, can contact you in case of problems.
|
||||
$IDENT = "VDR::getskyepg.pl, http://www.cadsoft.de/vdr - vdrbugs\@cadsoft.de";
|
||||
$GAP = 2;
|
||||
|
||||
$SkyWebPage = "www.bleb.org/tv/data/listings";
|
||||
$WGET = "/usr/bin/wget -q -O-";
|
||||
$WGET .= " -U '$IDENT'" unless $User;
|
||||
$LOGGER = "/usr/bin/logger -t SKYEPG";
|
||||
|
||||
$DST = -3600; # Daylight Saving Time offset
|
||||
@ -76,7 +87,8 @@ sub GetPage
|
||||
my $channel = shift;
|
||||
my $day = shift;
|
||||
$day--;
|
||||
my $url = "$SkyWebPage/$day/$channel.xml";
|
||||
my $url = "http://$SkyWebPage/$day/$channel.xml";
|
||||
$url .= "?$IDENT" if $User;
|
||||
Log("reading $url");
|
||||
my @page = split("\n", `$WGET '$url'`);
|
||||
Log("received " . ($#page + 1) . " lines");
|
||||
@ -174,6 +186,7 @@ sub GetEpgData
|
||||
$data .= $line;
|
||||
}
|
||||
}
|
||||
sleep($GAP);
|
||||
}
|
||||
SVDRPsend("c");
|
||||
Log("generated $numEvents EPG events");
|
||||
|
Loading…
Reference in New Issue
Block a user