Class: IPlayer::Subtitles
- Inherits:
-
Object
- Object
- IPlayer::Subtitles
- Includes:
- Errors
- Defined in:
- lib/iplayer/subtitles.rb
Constant Summary collapse
- SELECTOR_URL =
'http://www.bbc.co.uk/mediaselector/4/mtis/stream/%s'
Instance Method Summary collapse
-
#initialize(version_pid, browser) ⇒ Subtitles
constructor
A new instance of Subtitles.
- #w3c_timed_text ⇒ Object
Constructor Details
#initialize(version_pid, browser) ⇒ Subtitles
Returns a new instance of Subtitles.
10 11 12 13 |
# File 'lib/iplayer/subtitles.rb', line 10 def initialize(version_pid, browser) @version_pid = version_pid @browser = browser end |
Instance Method Details
#w3c_timed_text ⇒ Object
15 16 17 18 19 |
# File 'lib/iplayer/subtitles.rb', line 15 def w3c_timed_text url = subtitle_url return nil unless url @browser.get(url).body end |