-
- protected;
-
- def parse_video_url(data)
- video_url_regex = /http:\/\/(cdn\.)?yikers\.com\/([[:alnum:]_\/]+)\.flv/
- matches = video_url_regex.match(data)
- video_url = matches[0] if not matches.nil?
-
- return video_url
- end
-
-
- def parse_xml_path(data)
- xml_path_regex = /addVariable\(\'xml\', \'(.*?)\'\)/
- matches = xml_path_regex.match(data)
- xml_path = matches[1] if not (matches.nil? || matches.length < 2)
-
- return xml_path
- end
-
-
- def get_page_data(url)
- uri = URI.parse(url)
-
- response = Net::HTTP.start(uri.host, uri.port) do |http|
- http_path = uri.path
- http_path += ('?' + uri.query) if not uri.query.nil?
- http.get(http_path)
- end