Sha256: 3bed0a21a9fbf79e3f34fdf174161f3415a58c6cdba5a3076b4a8a1b7f3ee21e
Contents?: true
Size: 763 Bytes
Versions: 3
Compression:
Stored size: 763 Bytes
Contents
# -*- coding: utf-8 -*- # # tpoint.rb: T-POINT for PointsScraper # # Copyright (C) 2012 by TADA Tadashi <t@tdtds.jp> # Distributed under GPL. # require 'points-scraper/default' module Points::Scraper class TPoint < Default URL = 'https://tsite.jp' def start start_scrape do |agent| agent.open_timeout = 3 agent.get( URL + '/tm/pc/login/STKIp0001001.do' ) agent.page.form_with( :name => 'form1' ) do |form| form.action = URL + '/tm/pc/login/STKIp0001010.do' form['LOGIN_ID'] = @user form['PASSWORD'] = @pass form.click_button end agent.page.at( 'p.point > span.number' ).text end end end end # Local Variables: # mode: ruby # indent-tabs-mode: t # tab-width: 3 # ruby-indent-level: 3 # End: # vim: ts=3
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
points-scraper-0.1.3 | lib/points-scraper/tpoint.rb |
points-scraper-0.1.2 | lib/points-scraper/tpoint.rb |
points-scraper-0.1.1 | lib/points-scraper/tpoint.rb |