def retrieveVideoInfo(video_id): video_info = Video() video_info.set_video_host(getVideoHost()) video_info.set_id(video_id) try: video_info_link = 'http://www.veoh.com/rest/v2/execute.xml?method=veoh.video.findByPermalink&permalink=' + str( video_id) + '&apiKey=' + API_KEY soup = BeautifulStoneSoup( http.HttpClient().get_html_content(url=video_info_link), convertEntities=BeautifulStoneSoup.XML_ENTITIES) videoObj = soup.findChild(name='video') video_link = http.get_redirected_url(str(videoObj['ipodurl'])) img_link = str(videoObj['highresimage']) video_title = str(videoObj['title']) video_info.set_stopped(False) video_info.set_thumb_image(img_link) video_info.set_name(video_title) video_info.add_stream_link(STREAM_QUAL_SD, video_link) except: video_info.set_stopped(True) return video_info
def retrieveVideoInfo(video_id): video_info = Video() video_info.set_video_host(getVideoHost()) video_info.set_id(video_id) try: http.HttpClient().enable_cookies() html = http.HttpClient().get_html_content(url='http://www.vplay.ro/watch/' + str(video_id)) html = http.HttpClient().get_html_content(url='http://www.vplay.ro/play/dinosaur.do', params={'key':str(video_id)}) params = http.parse_url_params(html) video_link = http.get_redirected_url(url=params['nqURL']) http.HttpClient().disable_cookies() video_info.set_stopped(False) video_info.add_stream_link(STREAM_QUAL_SD, video_link) video_info.set_thumb_image(params['th']) except: video_info.set_stopped(True) return video_info
def retrieveVideoInfo(video_id): video_info = Video() video_info.set_video_host(getVideoHost()) video_info.set_id(video_id) try: http.HttpClient().enable_cookies() html = http.HttpClient().get_html_content( url='http://www.vplay.ro/watch/' + str(video_id)) html = http.HttpClient().get_html_content( url='http://www.vplay.ro/play/dinosaur.do', params={'key': str(video_id)}) params = http.parse_url_params(html) video_link = http.get_redirected_url(url=params['nqURL']) http.HttpClient().disable_cookies() video_info.set_stopped(False) video_info.add_stream_link(STREAM_QUAL_SD, video_link) video_info.set_thumb_image(params['th']) except: video_info.set_stopped(True) return video_info
def retrieveVideoInfo(video_id): video_info = Video() video_info.set_video_host(getVideoHost()) video_info.set_id(video_id) try: video_info_link = 'http://www.veoh.com/rest/v2/execute.xml?method=veoh.video.findByPermalink&permalink=' + str(video_id) + '&apiKey=' + API_KEY soup = BeautifulStoneSoup(http.HttpClient().get_html_content(url=video_info_link), convertEntities=BeautifulStoneSoup.XML_ENTITIES) videoObj = soup.findChild(name='video') video_link = http.get_redirected_url(str(videoObj['ipodurl'])) img_link = str(videoObj['highresimage']) video_title = str(videoObj['title']) video_info.set_stopped(False) video_info.set_thumb_image(img_link) video_info.set_name(video_title) video_info.add_stream_link(STREAM_QUAL_SD, video_link) except: video_info.set_stopped(True) return video_info