View Full Version : best-laptop-reviews.com in 30 minutes
Here's a really quick and dirty sample I threw together in about 30 mins.
http://best-laptop-reviews.com/
I used a scraper to rip the product descriptions and images from bestbuy.com into a CSV file. I uploaded all the images to folder via FTP. Then when I imported the CSV file, I used the image name column within an <img> tag and used the brand name and model number in a phpbay tag. That generated posts like this:
http://best-laptop-reviews.com/gateway-fx-edition-laptop-with-intel-centrino-processor-technology/
Obviously, this site isn't ready for prime time (needs more content) but it's a hell of a decent start for 30 mins of work.
1nspire
01-17-2009, 03:14 PM
Hey Ryan would you be so kind as to show me what you post looks like in the html setting. I really like what you have going here.
The post template looks like this:
<img src="/wp-content/uploads/laptops/[Image]" class="thumbnail">
<p>Model: [Model]</p>
<p>[Description]</p>
<h2>Where to buy</h2>
[Brand] [Model]
gapro
03-15-2009, 04:06 AM
Impressive indeed. Which scraper did you use to get the bestbuy.com content?
I've looked into Ruby Mechanize & Scrubyt recently, but don't have a complete solution yet.
Did you roll your own or are you using something off the shelf?
I used a free account on Dapper.net to scrape it.
I promised everyone on here a video on how I did it and I'll have that ready within the next day or so.
Jizzlobber
03-18-2009, 01:43 PM
@ryan - have you tried using inline CSS in your post template to alter appearance or are you modifying display styling in other ways?
I'm not a fan of inline CSS but it's a perfectly acceptable solution. I would add any custom CSS styles to the theme's stylesheet, personally.
doug102938
03-28-2009, 06:58 AM
were you able to automate the process of ripping the images from bestbuy and placing them into your wordpress uploads folder? and if so how? thanks
I automated the ripping of the images with a quick and dirty PHP script.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Download a list of images</title>
</head>
<body>
<?php
if($_POST)
{
$list = array();
$images = explode("\n", $_POST['list']);
foreach($images as $image)
{
$pathinfo = pathinfo($image);
$basename = trim($pathinfo['basename']);
$dest = dirname(__FILE__).'/images/'.$basename;
$list[] = $basename;
copy(trim($image), $dest);
}
echo 'Done!';
}
?>
<form method="post">
<textarea name="list" rows="20" cols="90"><?php if(isset($list)) echo join("\r\n", $list); ?></textarea><br />
<input type="submit" value="Download" />
</form>
</body>
</html>
That will give you a text area to paste in a list of URL of images to download. It will download them all to a folder called "images" and then spit back the names of the images.
sambavammi
05-16-2009, 03:04 PM
Ryan,
have you got around to post the video on how you did the lap top site, i am still poking around for a good scrapper tool, any sugestions ? guys and gals :)
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.