commit 3ba64050a7bcbf6e3d15409afaabbe513fb62578
parent fc22fdfeae9d925bde84dfabd011db004228348b
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Sat, 4 Apr 2015 13:33:30 -0600
product_scraper: be more liberal when finding brand
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/product_scraper b/product_scraper
@@ -252,7 +252,8 @@ sub mem_exp_scrape_thumbnail
if ($brand eq "") {
# and sometimes shows up inside the tag attributes
$brand = $dom->find(".ProductBrand")->html();
- ($brand) = ($brand =~ m/Brand: ([A-Za-z]+)/);
+ # XXX: revisit this regex, it should be less strict
+ ($brand) = ($brand =~ m/Brand: ([0-9A-Za-z\. ]+)/);
}
if (!defined $brand || $brand eq "") {
print $log "$error_hdr: .ProductBrand not found, html was:\n";