class FotopicScanner < RSSscraper::AbstractScanner
	def initialize
		@url_string = 'http://gallery.bofhcam.org/c29972.html'
		@base_url = 'http://gallery.bofhcam.org'
		# LinuxUser Expo 2003. Any Fotopic collection should be
		# similar.
		@postsRE = /td width=25% class="thumbs">\n\t\t\t\t<a href="([^\s\t\r\n\f]*)"><img src="([^\s\t\r\n\f]*)" width=150 height=112 class="thumbs"><\/a><br\/>\n<div class="thumbs-description">([^>]*)/m
	end

	def find_items
		require 'cgi'
		items = Array.new
		request_feed.scan(@postsRE).each{ |link, content, title|
			items << { :title => title,
				   :description => "&lt;img src=&quot;"+"#{CGI::escapeHTML(content)}"+"&quot;&gt;", 
				   :link => @url_string+link,
 				 }
		}
		items
	end
end

class Fotopic < RSSscraper::AbstractScraper

	def scanner
		FotopicScanner.new
	end

	def description
	{
		:link => 'http://gallery.bofhcam.org/c29972.html',
		:title => 'BOFHcam - LinuxUser Expo 2003',
		:description => 'Sample fotopics.net scraper',
		:language => 'en-us',
		:generator => generator_string
	}	
	end

end
