IMEI Scraper
Scrapes warranty infomation about Apple devices by IMEI number.
Installation
$ git clone https://github.com/zoer/imei-scraper
$ cd imei-sraper
$ bundle install
Usage
Use with a browser
or You can run it by self:
$ bundle exec rails s
$ open http://localhost:3000
Use from the command line
$ bin/imei 123456789012347 013977000323877 013896000639712
[
{
"status": 200,
"imei": "123456789012347",
"result": {
"imei": "123456789012347",
"not_activated": true
}
},
{
"status": 200,
"imei": "013977000323877",
"result": {
"phone_has_coverage": true,
"hardware_has_coverage": true,
"hardware_support_coverage": "PD",
"has_active_app": false,
"app_eligible": false,
"ppi_eligible": false,
"product_type": "iPhone",
"days_since_dop": "299",
"has_tech_tool": false,
"phone_expiration": "2016-08-10",
"hardware_expiration": "2016-08-10",
"image": "https://km.support.apple.com.edgekey.net/kb/securedImage.jsp?configcode=FFHN&size=72x72",
"product_name": "iPhone 5c",
"imei": "013977000323877"
}
},
...
]
Use IRB
$ irb
irb(main):001:0> require_relative "lib/scraper"
=> true
irb(main):002:0> r = Scraper::ImeiReport.new
=> #<Scraper::ImeiReport:0x007f024c893c08 @crawler=#<Scraper::Crawler::AppleImei:0x007f024c88d3d0>, @parser=#<Scraper::Parser::ImeiPage:0x007f024c868cd8 @data={}, @doc=nil>>
irb(main):003:0> r.get("013977000323877")
=> {:status=>200, :imei=>"013977000323877", :result=>{:phone_has_coverage=>true, :hardware_has_coverage=>true, :hardware_support_coverage=>"PD", :has_active_app=>false, :app_eligible=>false, :ppi_eligible=>false, :product_type=>"iPhone", :days_since_dop=>"299", :has_tech_tool=>false, :phone_expiration=>"2016-08-10", :hardware_expiration=>"2016-08-10", :image=>"https://km.support.apple.com.edgekey.net/kb/securedImage.jsp?configcode=FFHN&size=72x72", :product_name=>"iPhone 5c", :imei=>"013977000323877"}}