Changeset 156
- Timestamp:
- 10/26/06 17:15:59 (7 years ago)
- Files:
-
- 7 modified
-
grabbers/abc2_website (modified) (7 diffs)
-
grabbers/abc_website (modified) (7 diffs)
-
grabbers/sbsnews_website.conf (modified) (1 diff)
-
grabbers/yahoo7widget (modified) (5 diffs)
-
postprocessors/imdb_augment_data (modified) (7 diffs)
-
reconcilers/reconciler_mk2 (modified) (4 diffs)
-
status (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
grabbers/abc2_website
r108 r156 18 18 19 19 my $progname = "abc2_website"; 20 my $version = "1.57_2 0oct06";20 my $version = "1.57_27oct06"; 21 21 22 22 use LWP::UserAgent; … … 185 185 no warnings 'all'; eval <>; die "$@" if $@; 186 186 } else { 187 printf STDERR"WARNING: no programme cache $opt_cache_file - have to fetch all details\n";187 printf "WARNING: no programme cache $opt_cache_file - have to fetch all details\n"; 188 188 189 189 # try to write to it - if directory doesn't exist this will then cause an error … … 198 198 { 199 199 if (!(open(F,">$opt_cache_file"))) { 200 printf STDERR"WARNING: could not write cache file $opt_cache_file: $!\n";201 printf STDERR"Please fix this in order to reduce the number of queries for data!\n";200 printf "WARNING: could not write cache file $opt_cache_file: $!\n"; 201 printf "Please fix this in order to reduce the number of queries for data!\n"; 202 202 sleep 10; 203 203 } else { … … 357 357 } 358 358 if ($seen_programme == 0) { 359 printf STDERR"WARNING: failed to parse any programme data from '%s' - blocked/rate-limited/format-changed?\n",$url;359 printf "WARNING: failed to parse any programme data from '%s' - blocked/rate-limited/format-changed?\n",$url; 360 360 $stats{failed_to_parse_portal_detail_page}++; 361 361 } … … 422 422 { 423 423 my ($entry) = @_; 424 printf STDERR"%s [%d] %s\n",$progname, time,$entry;424 printf "%s [%d] %s\n",$progname, time,$entry; 425 425 } 426 426 … … 429 429 sub print_stats 430 430 { 431 printf STDERR"%s %s [%d] completed in %0.2f seconds",$progname, $version, time, tv_interval($script_start_time);431 printf "%s %s [%d] completed in %0.2f seconds",$progname, $version, time, tv_interval($script_start_time); 432 432 foreach my $key (sort keys %stats) { 433 printf STDERR", %d %s",$stats{$key},$key;434 } 435 printf STDERR"\n";433 printf ", %d %s",$stats{$key},$key; 434 } 435 printf "\n"; 436 436 } 437 437 … … 451 451 elsif (defined $$x) { 452 452 $$x =~ s/&(#(\d+)|(.*?));/ $2 ? chr($2) : $amp{$3}||' ' /eg; 453 #$$x =~ s/[^\x20-\x7f]/ /g;453 $$x =~ s/[^\x20-\x7f]/ /g; 454 454 $$x =~ s/(^\s+|\s+$)//g; 455 455 } -
grabbers/abc_website
r108 r156 18 18 19 19 my $progname = "abc_website"; 20 my $version = "1.57_2 1oct06";20 my $version = "1.57_27oct06"; 21 21 22 22 use LWP::UserAgent; … … 185 185 no warnings 'all'; eval <>; die "$@" if $@; 186 186 } else { 187 printf STDERR"WARNING: no programme cache $opt_cache_file - have to fetch all details\n";187 printf "WARNING: no programme cache $opt_cache_file - have to fetch all details\n"; 188 188 189 189 # try to write to it - if directory doesn't exist this will then cause an error … … 198 198 { 199 199 if (!(open(F,">$opt_cache_file"))) { 200 printf STDERR"WARNING: could not write cache file $opt_cache_file: $!\n";201 printf STDERR"Please fix this in order to reduce the number of queries for data!\n";200 printf "WARNING: could not write cache file $opt_cache_file: $!\n"; 201 printf "Please fix this in order to reduce the number of queries for data!\n"; 202 202 sleep 10; 203 203 } else { … … 357 357 } 358 358 if ($seen_programme == 0) { 359 printf STDERR"WARNING: failed to parse any programme data from '%s' - blocked/rate-limited/format-changed?\n",$url;359 printf "WARNING: failed to parse any programme data from '%s' - blocked/rate-limited/format-changed?\n",$url; 360 360 $stats{failed_to_parse_portal_detail_page}++; 361 361 } … … 422 422 { 423 423 my ($entry) = @_; 424 printf STDERR"%s [%d] %s\n",$progname, time,$entry;424 printf "%s [%d] %s\n",$progname, time,$entry; 425 425 } 426 426 … … 429 429 sub print_stats 430 430 { 431 printf STDERR"%s %s [%d] completed in %0.2f seconds",$progname, $version, time, tv_interval($script_start_time);431 printf "%s %s [%d] completed in %0.2f seconds",$progname, $version, time, tv_interval($script_start_time); 432 432 foreach my $key (sort keys %stats) { 433 printf STDERR", %d %s",$stats{$key},$key;434 } 435 printf STDERR"\n";433 printf ", %d %s",$stats{$key},$key; 434 } 435 printf "\n"; 436 436 } 437 437 … … 451 451 elsif (defined $$x) { 452 452 $$x =~ s/&(#(\d+)|(.*?));/ $2 ? chr($2) : $amp{$3}||' ' /eg; 453 #$$x =~ s/[^\x20-\x7f]/ /g;453 $$x =~ s/[^\x20-\x7f]/ /g; 454 454 $$x =~ s/(^\s+|\s+$)//g; 455 455 } -
grabbers/sbsnews_website.conf
r144 r156 6 6 'regions' => '', 7 7 'option_ready' => '--version', 8 'desc' => 'guide data for SBS News only from http://www.sbs.com.au/whatson/WNC-Schedule.html',8 'desc' => 'guide data for SBS News only from www.sbs.com.au/whatson/WNC-Schedule.html', 9 9 'max_days' => 7, 10 10 'category' => 2, -
grabbers/yahoo7widget
r108 r156 17 17 18 18 my $progname = "yahoo7widget"; 19 my $version = "1.5 6_21oct06";19 my $version = "1.57_21oct06"; 20 20 21 21 use LWP::UserAgent; … … 39 39 40 40 my $ua; 41 BEGIN { 42 $ua = LWP::UserAgent->new( 43 'timeout' => 30, 44 'keep_alive' => 1, 45 'agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-us)' 46 ); 47 $ua->env_proxy; 48 # $ua->cookie_jar({}); 49 $| = 1; 50 } 41 $ua = LWP::UserAgent->new( 42 'timeout' => 30, 43 'keep_alive' => 1, 44 'agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-us)' 45 ); 46 $ua->env_proxy; 47 # $ua->cookie_jar({}); 48 $| = 1; 51 49 52 50 # … … 295 293 { 296 294 my ($entry) = @_; 297 printf STDERR"%s [%d] %s\n",$progname,time,$entry;295 printf "%s [%d] %s\n",$progname,time,$entry; 298 296 } 299 297 … … 302 300 sub print_stats 303 301 { 304 printf STDERR"%s v%s [%d] completed in %0.2f seconds",$progname,$version,time,tv_interval($script_start_time);302 printf "%s v%s [%d] completed in %0.2f seconds",$progname,$version,time,tv_interval($script_start_time); 305 303 foreach my $key (sort keys %stats) { 306 printf STDERR", %d %s",$stats{$key},$key;307 } 308 printf STDERR"\n";304 printf ", %d %s",$stats{$key},$key; 305 } 306 printf "\n"; 309 307 } 310 308 … … 331 329 my $event_start = $event->getElementsByTagName("event_date")->item(0)->getFirstChild->getNodeValue; 332 330 my $event_end = $event->getElementsByTagName("end_date")->item(0)->getFirstChild->getNodeValue; 331 332 if ($event_start < 10) { 333 $stats{progs_with_invalid_start}++; 334 printf "WARNING: programme with event_id '$event_id' had an invalid start time of '$event_start'; skipped\n"; 335 next; 336 } 337 if ($event_end < 10) { 338 $stats{progs_with_invalid_end}++; 339 printf "WARNING: programme with event_id '$event_id' had an invalid end time of '$event_end'; skipped\n"; 340 next; 341 } 342 333 343 $event_id .= $event_start . $event_end; # event_id actually isn't unique - so make it so 334 344 -
postprocessors/imdb_augment_data
r88 r156 25 25 26 26 my $progname = "imdb_augment_data"; 27 my $version = "0.0 3_19aug06";27 my $version = "0.04_19aug06"; 28 28 29 29 use LWP::UserAgent; … … 200 200 no warnings 'all'; eval <>; die "$@" if $@; 201 201 } else { 202 printf STDERR"WARNING: no cache $opt->{cache_file} - ".202 printf "WARNING: no cache $opt->{cache_file} - ". 203 203 "have to fetch all details.\n"; 204 204 &write_cache; # try to write to it - failure will cause an error & barf … … 237 237 { 238 238 if (!(open(F,">$opt->{cache_file}"))) { 239 printf STDERR"ERROR: could not write cache file %s: %s\n",239 printf "ERROR: could not write cache file %s: %s\n", 240 240 $opt->{cache_file}, $!; 241 printf STDERR"You need to fix this before you can use %s\n",241 printf "You need to fix this before you can use %s\n", 242 242 $progname; 243 243 exit(1); … … 309 309 { 310 310 my ($entry) = @_; 311 printf STDERR"%s [%d] %s\n",$progname, time,$entry;311 printf "%s [%d] %s\n",$progname, time,$entry; 312 312 } 313 313 … … 316 316 sub print_stats 317 317 { 318 printf STDERR"%s v%s [%d] completed in %0.2f seconds",318 printf "%s v%s [%d] completed in %0.2f seconds", 319 319 $progname, $version, time, tv_interval($script_start_time); 320 320 foreach my $key (sort keys %stats) { 321 printf STDERR", %d %s",$stats{$key},$key;322 } 323 printf STDERR"\n";321 printf ", %d %s",$stats{$key},$key; 322 } 323 printf "\n"; 324 324 325 325 if ($opt->{debug}) { … … 714 714 } 715 715 716 &log("looking up \"$movie_title\" duration $prog_duration, matching categories: $interested");717 716 $stats{included_for_imdb_lookup}++; 718 717 … … 735 734 if (defined $data_cache->{movie_id_lookup}->{$post_fields}) { 736 735 $stats{imdb_lookup_used_cache_entry}++; 736 &log("used (cache) lookup \"$movie_title\" duration $prog_duration, matching categories: $interested"); 737 737 } else { 738 &log("looking up \"$movie_title\" duration $prog_duration, matching categories: $interested"); 738 739 &search_imdb_online($movie_title,$post_fields); 739 740 -
reconcilers/reconciler_mk2
r129 r156 91 91 92 92 my $progname = "reconciler_mk2"; 93 my $version = "0. 09_24oct06";93 my $version = "0.10_27oct06"; 94 94 95 95 use LWP::UserAgent; … … 420 420 # check if we are in an eval() 421 421 if ($^S) { 422 printf STDERR" caught a die() within eval{} from file $file line $line\n";422 printf " caught a die() within eval{} from file $file line $line\n"; 423 423 } else { 424 424 if (!ref($arg)) { 425 printf STDERR"DIE at line %d in file %s:\nERROR: %s\n",$line,$file,$arg;425 printf "DIE at line %d in file %s:\nERROR: %s\n",$line,$file,$arg; 426 426 CORE::die(join("",@rest)); 427 427 } else { … … 505 505 { 506 506 my ($log_level,$entry) = @_; 507 printf STDERR"%s [%d] %s\n",$progname, time,$entry if ($log_level);507 printf "%s [%d] %s\n",$progname, time,$entry if ($log_level); 508 508 #printf LOG_FILE "%s [%d] %s\n",$progname, time,$entry if (($log_level) && (!$opt->{nolog})); 509 509 printf LOG_FILE "%s [%d] %s\n",$progname, time,$entry unless ($opt->{nolog}); … … 514 514 sub print_stats 515 515 { 516 printf STDERR"%s v%s [%d] completed in %0.2f seconds",$progname, $version, time, tv_interval($script_start_time);516 printf "%s v%s [%d] completed in %0.2f seconds",$progname, $version, time, tv_interval($script_start_time); 517 517 foreach my $key (sort keys %stats) { 518 printf STDERR",\n\t%d %s", $stats{$key},$key;519 } 520 printf STDERR".\n";518 printf ",\n\t%d %s", $stats{$key},$key; 519 } 520 printf ".\n"; 521 521 } 522 522 -
status
r150 r156 4 4 grabber:abc_website:1.57-r1 5 5 grabber:abc2_website:1.57-r1 6 grabber:sbsnews_website:0.02 7 grabber:yahoo7widget:1.5 6-r26 grabber:sbsnews_website:0.02-r1 7 grabber:yahoo7widget:1.57 8 8 grabber:jrobbo:0.04-r3 9 9 grabber:d1:0.6.2.4-r2 10 10 reconciler:reconciler_mk2:0.09-r1 11 postprocessor:imdb_augment_data:0.0 3-r111 postprocessor:imdb_augment_data:0.04
