- # First we download the page. Each page contains a flash parameter
- # called 'xml' which contains the relative path to the video's XML file.
- # We download their XML file (passing it the video id as a side effect),
- # and that contains the URL of the video file we want.
- page_data = get_page_data(@url)
- xml_path = self.parse_xml_path(page_data)
-
- # The XML path parameter doesn't contain a host name.
- xml_url = "http://#{self.server}#{xml_path}"
- xml_data = get_page_data(xml_url)
+ # The video URL is usually just a fixed location, with the file
+ # name from the page URL slightly modified. For example,
+ #
+ # http://www.yikers.com/video_the_best_rapper_in_the_world.html
+ #
+ # gets mapped to,
+ #
+ # http://cdn.yikers.com/flv/flash8/yikers_the_best_rapper_in_the_world.flv
+ #
+ file_name = get_video_filename().sub('video_', 'yikers_')