commit 5d6620e98e6ef1fb8cfc76c58b8052dc31d2386a
parent 0b16990609dd8aa6abdd13f01a98bdc5e8d3ddee
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Sun, 1 Feb 2015 16:40:12 -0700
price_scraper: silence a warning and fix a comment
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/price_scraper.pl b/price_scraper.pl
@@ -56,7 +56,7 @@ $sql = "update products set last_seen = ? where part_num = ?";
my $products_sth = $dbh->prepare($sql);
my ($start, @status, $i) = (time, "", -1);
-while (my ($vendor, $props) = each $cfg->{"vendors"}) {
+while (my ($vendor, $props) = each %{$cfg->{"vendors"}}) {
my $url = $props->{"search_url"};
my $color = $props->{"color"};
my $price_tag = $props->{"price_regular"};
@@ -109,7 +109,7 @@ printf $log "%s %-10s %-15s [%s] (%i s)\n", strftime("%F %T", localtime),
close $log;
-# record that we finished scraping this product, successful or not
+# record that we finished scraping this product
$dbh->do("update products set last_scraped = ? where part_num = ?",
undef, time, $part_num);