Class: Saber::Tracker::STP
- Defined in:
- lib/saber/tracker/stp.rb
Constant Summary collapse
- BASE_URL =
"https://stopthepress.es"
- LOGIN_CHECK_PATH =
"/inbox.php"
Constants inherited from Gazelle
Constants inherited from Base
Base::DELEGATE_METHODS, Base::POPULATE_TYPES
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Gazelle
Methods inherited from Base
can_populate?, inherited, #initialize, #login, #populate, #upload
Constructor Details
This class inherits a constructor from Saber::Tracker::Base
Instance Method Details
#exists?(o = {}) ⇒ Boolean
7 8 9 10 11 12 |
# File 'lib/saber/tracker/stp.rb', line 7 def exists?(o={}) url = "/torrents.php?cataloguenumber=#{o[:isbn]}" page = agent.get(url) not page.at("//*[@id='content']/div[2]/h2[contains(text(), 'Your search did not match anything.')]") end |