Пример #1
0
 def test_video_pages_no_video(self, foo):
   expected = []
   actual = video_pages('')
   self.assertEqual(actual, expected)
Пример #2
0
 def test_video_pages_video_list(self, foo):
   expected = ['http://www.jeuxvideo.com/gaming-live/0001/00011717/kingdom-hearts-chain-of-memories-gameboy-advance-gba-sora-00000849.htm', 'http://www.jeuxvideo.com/gaming-live/0001/00011717/kingdom-hearts-chain-of-memories-gameboy-advance-gba-riku-00000848.htm']
   actual = video_pages('')
   self.assertEqual(actual, expected)
Пример #3
0
 def test_video_pages_homepage(self, foo):
   expected = ['http://www.jeuxvideo.com/videos/chroniques/435106/le-fond-de-l-affaire-les-secrets-de-league-of-legends.htm', 'http://www.jeuxvideo.com/videos/gaming-live/435104/batgirl-une-affaire-de-famille-qui-tourne-a-la-debandade.htm', 'http://www.jeuxvideo.com/videos/chroniques/435006/merci-dorian-les-adaptations-de-romans.htm', 'http://www.jeuxvideo.com/videos/chroniques/434977/top-10-des-armes-les-plus-emblematiques-et-fun-du-mode-zombies-de-call-of-duty.htm', 'http://www.jeuxvideo.com/videos/chroniques/434958/speed-game-live-any-majora-s-mask-fini-en-moins-de-1h35.htm', 'http://www.jeuxvideo.com/videos/chroniques/434948/au-ceur-de-l-histoire-de-the-witcher-3-episode-4.htm', 'http://www.jeuxvideo.com/videos/433983/call-of-duty-black-ops-une-carte-bonus-pour-le-mode-zombie.htm', 'http://www.jeuxvideo.com/videos/chroniques/434845/l-univers-du-jeu-independant-spectra-le-jeu-musical-8bit.htm', 'http://www.jeuxvideo.com/videos/chroniques/434762/vgm-portal-2.htm', 'http://www.jeuxvideo.com/videos/chroniques/434326/top-10-des-meilleures-scenes-animees-de-minecraft.htm', 'http://www.jeuxvideo.com/videos/chroniques/434220/l-histoire-du-jeu-video-la-saturn.htm', 'http://www.jeuxvideo.com/videos/chroniques/434070/le-fond-de-l-affaire-special-jeux-inde-fez-shovel-knight.htm', 'http://www.jeuxvideo.com/videos/chroniques/433926/le-defi-du-challenge-medhi-et-cdv-s-affrontent-sur-le-theme-des-oiseaux.htm', 'http://www.jeuxvideo.com/videos/chroniques/433900/speed-game-hotline-miami-2-en-moins-de-40-minutes.htm', 'http://www.jeuxvideo.com/videos/chroniques/433699/l-univers-du-jeu-independant-dolly-de-projet-etudiant-a-plateformer-reussi.htm', 'http://www.jeuxvideo.com/videos/chroniques/433497/pause-process-visual-scripting-la-programmation-pour-tous.htm', 'http://www.jeuxvideo.com/videos/435083/une-petite-dose-de-gameplay-pour-fallout-4.htm', 'http://www.jeuxvideo.com/videos/434357/just-cause-3-6-minutes-de-gameplay-dejante.htm', 'http://www.jeuxvideo.com/videos/435143/rayman-adventures-les-10-premieres-minutes-de-gameplay.htm', 'http://www.jeuxvideo.com/videos/435159/tekken-7-les-costumes-idolmasters-entrent-en-scene.htm', 'http://www.jeuxvideo.com/videos/435057/le-trailer-sanglant-de-tremor-pour-mortal-kombat-x.htm', 'http://www.jeuxvideo.com/videos/435160/un-apercu-de-gameplay-pour-monster-hunter-x.htm', 'http://www.jeuxvideo.com/videos/435110/aurora-dusk-un-age-of-empire-like-independant-francais.htm', 'http://www.jeuxvideo.com/videos/434216/saint-seiya-soldiers-soul-fenrir-vs-dragon-shiryu.htm', 'http://www.jeuxvideo.com/videos/434886/1h-de-gameplay-sur-assassin-s-creed-syndicate.htm']
   actual = video_pages('')
   self.assertEqual(actual, expected)
Пример #4
0
 def test_video_pages_video_section(self, foo):
   expected = ['http://www.jeuxvideo.com/videos/chroniques/434958/speed-game-live-any-majora-s-mask-fini-en-moins-de-1h35.htm', 'http://www.jeuxvideo.com/videos/chroniques/433900/speed-game-hotline-miami-2-en-moins-de-40-minutes.htm', 'http://www.jeuxvideo.com/videos/chroniques/432648/speed-game-run-frenetique-sur-ikaruga.htm', 'http://www.jeuxvideo.com/videos/chroniques/431456/speed-game-finir-outlast-en-23-minutes.htm', 'http://www.jeuxvideo.com/videos/chroniques/430713/speed-game-boucler-twinbee-rba-en-moins-de-26-minutes.htm', 'http://www.jeuxvideo.com/videos/chroniques/429020/speed-game-boucler-bastion-en-moins-de-15-minutes.htm', 'http://www.jeuxvideo.com/videos/chroniques/428141/speed-game-donkey-kong-country-tropical-freeze-a-toute-allure.htm', 'http://www.jeuxvideo.com/videos/chroniques/427331/speed-game-une-cyber-run-sur-deus-ex-human-revolution.htm', 'http://www.jeuxvideo.com/videos/chroniques/426604/speed-game-sonic-adventure-2-en-moins-de-30-minutes.htm', 'http://www.jeuxvideo.com/videos/chroniques/425830/speed-game-s-attaque-au-premier-darksiders.htm', 'http://www.jeuxvideo.com/videos/chroniques/425168/speed-game-okami-hd-fini-en-1h27.htm', 'http://www.jeuxvideo.com/videos/chroniques/424566/speed-game-new-super-mario-bros-wii-fini-en-moins-de-30-minutes.htm', 'http://www.jeuxvideo.com/videos/chroniques/423798/speed-game-une-run-en-live-sur-1001-spikes.htm']
   actual = video_pages('')
   self.assertEqual(actual, expected)
Пример #5
0
def videos(url):
  logger.debug("[api] videos("+ url +")")

  pages = parser.video_pages(url)

  return [video(url) for url in pages]