Sha256: aec7de9e3bd6d0c3f746fb33a6f53a81ef551387350cf8aa409184c2fb1b8407

Contents?: true

Size: 429 Bytes

Versions: 5

Compression:

Stored size: 429 Bytes

Contents

# -*- coding: utf-8 -*-
#
# default.rb: PointsScraper commons
#
# Copyright (C) 2012 by TADA Tadashi <t@tdtds.jp>
# Distributed under GPL.
#

module Points::Scraper
	class Default
		require 'mechanize'

		def initialize( user, pass )
			@user, @pass = user, pass
		end

	private
		def start_scrape
			agent = Mechanize::new
			agent.set_proxy( *ENV['HTTP_PROXY'].split( /:/ ) ) if ENV['HTTP_PROXY']
			yield agent
		end
	end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
points-scraper-0.1.4 lib/points-scraper/default.rb
points-scraper-0.1.3 lib/points-scraper/default.rb
points-scraper-0.1.2 lib/points-scraper/default.rb
points-scraper-0.1.1 lib/points-scraper/default.rb
points-scraper-0.1.0 lib/points-scraper/default.rb