def test_api(self):
     url = youtube_tools.GenerateYouTubeURL("she is still sleeping SAO",
                                            meta_tags=None)
     video_ids = url.api(bestmatch=False)
     const.args.manual = False
     # API gives us 50 videos (or as requested)
     assert len(video_ids) == 50
Beispiel #2
0
 def test_api(self):
     url = youtube_tools.GenerateYouTubeURL(RESULT_COUNT_SEARCH,
                                            meta_tags=None)
     video_ids = url.api(bestmatch=False)
     const.args.manual = False
     # API gives us 50 videos (or as requested)
     assert len(video_ids) == 50
 def test_scrape(self):
     const.args.manual = True
     url = youtube_tools.GenerateYouTubeURL("she is still sleeping SAO",
                                            meta_tags=None)
     video_ids = url.scrape(bestmatch=False)
     # Web scraping gives us all videos on the 1st page
     assert len(video_ids) == 20
Beispiel #4
0
 def test_scrape(self):
     const.args.manual = True
     url = youtube_tools.GenerateYouTubeURL(RESULT_COUNT_SEARCH,
                                            meta_tags=None)
     video_ids = url.scrape(bestmatch=False)
     # Web scraping gives us all videos on the 1st page
     assert len(video_ids) == 20