예제 #1
0
파일: video.py 프로젝트: Benzhaomin/franck
  def load(self):
    if self.loaded():
      return self

    # get data from the player's config xml file
    config = parser.video_config(self.url)

    # get data from the video's page
    info = parser.video_info(self.url)

    # merge that in a dict
    self.json = self.beautify(config, info)

    return self
예제 #2
0
 def test_video_config_has_it(self, foo, bar):
   expected = json.loads(load_video_config(''))
   actual = video_config('')
   self.assertEqual(ordered(actual), ordered(expected))
예제 #3
0
 def test_video_config_404(self, foo):
   expected = None
   actual = video_config('')
   self.assertEqual(actual, expected)