Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Started hacking on a BT DSL checker screen scraper thing
require 'rubygems'
require 'nokogiri'
require "net/http"
require "uri"
class DSLChecker
def check_phone_number(number)
params = { "TelNo" => number }
endpoint = URI.parse("http://www.dslchecker.bt.com/adsl/ADSLChecker.TelephoneNumberOutput")
response = Net::HTTP.post_form(endpoint, params)
html = Nokogiri::HTML(response.body)
# puts response.body
puts html.css("span.body span.body span.body").to_s.inspect
end
end
d = DSLChecker.new
d.check_phone_number("YOURNUMBERHERE")
@g3raint

This comment has been minimized.

Copy link

commented Oct 7, 2016

Have you any update on this one ? or know of any other project looking at doing the same (PHP maybe ?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.