Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

drom

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drom

  • 0.1.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Drom

парсер drom.ru

$ gem install drom

Возможные варианты использования


s = Drom.search(make: "toyota", model: "camry", maxprice: 900000, minyear: 2009, status: :spinner)
s.listings
# > [{поля которые были доступны "Двигатель"=>"бензин, 3.5 л", "Мощность"=>"249 л.с", ...}, {}, ...]

# status: :spinner показывает прогресс в терминале

# сохраняет результат в listings.csv
s = Drom.search(make: "toyota", model: "camry", minprice: 900000, maxyear: 2010)
s.to_csv

#
s = Drom.search(make: "toyota", model: "camry", minprice: 900000, maxyear: 2010)
s.each { |listing| p listing["Цена"] }

arr = []
Drom.search(make: "toyota", model: "camry") { |listing| arr << listing["Цена"] }
# > arr
# => ["235000", "249999", nil, "300000", ...]

s = Drom.search(make: "toyota", model: "camry")
s.map { |e| e["Цена"] }
# => ["10000", "109000", "130000", "270000", "270000", nil, "300000", "222000", "300000"]

Drom.get_single_listing(url)
# {"Двигатель"=>"бензин, 3.5 л", "Мощность"=>"249 л.с", ...}

Пример того как может выглядеть csv: listing.csv

License

MIT

FAQs

Package last updated on 28 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc