Module: GateWay
- Included in:
- VideoParser::VideoSite
- Defined in:
- lib/video_parser/gateway.rb
Instance Method Summary collapse
Instance Method Details
#get_doc(uri, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/video_parser/gateway.rb', line 6 def get_doc(uri, = {}) [:timeout] ||= 20 begin page = HTTParty.get(uri.to_s, :timeout => [:timeout]).to_s Nokogiri::HTML(conv_page(page)) rescue nil end end |