taylor / ypscaper Goto Github PK
View Code? Open in Web Editor NEWYellow Page Scraper - search the yellow pages via various online sites
Yellow Page Scraper - search the yellow pages via various online sites
Yellow Page Scraper is a library for searching various online yellow pages providers such as switchboard.com and superpages.com. The search method returns an array of results or an empty list. The minimum required arguments are keyword, city, and state (passed in that order). The rest of the arguments should be passed as has options :provider => :switchboard :num_results => 10 :num_results => :all Currently only supports switchboard fully. Superpages (:superpages) and yellowpages.com (:yellowpages) are on the way. Each result has at least the name set. Anything missing will be set to nil. Here is the entire list of possible data found (accessed via result.<data name>): url - website (often not found or some search url for the provider) name - business name or person's name phone - main phone number (sometimes they have additional numbers. currently not getting those) address - main address city state zip - usually not there email provider - which provider was used to find the data == Usage require 'ypscraper' yp = YPScraper.new(:switchboard) # See how many entires are on the first page print "Number of results for first page when searching dentist in austin, tx is " + yp.search("dentist", "austin", "tx").size.to_s puts # Get 1st 3 yellow page entries results = yp.search("dentist", "austin", "tx" , :num_results=>3) results.each_with_index do |r,i| puts "#{i} - #{r.name} / #{r.url} / #{r.address} / #{r.url}" end # Get all entries for a search results = yp.search("Periodontics Dentists", "austin", "tx" , :num_results=>:all) results.each_with_index do |r,i| puts "#{i} - #{r.name} / #{r.url} / #{r.address} / #{r.url}" end == License Copyright (c) 2009 Taylor Carpenter <[email protected]> You may use, copy and redistribute this library under the same terms as {Ruby itself}[http://www.ruby-lang.org/en/LICENSE.txt] or under the {MIT license}[http://mocha.rubyforge.org/files/MIT-LICENSE.html].
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.