def play_video(video_url = _common.args.url): video_data = _connection.getURL(video_url, header = {'X-Forwarded-For' : '12.13.14.15'}) try: video_url2 = re.compile('<meta content="http://media.mtvnservices.com/fb/(.+?).swf" property="og:video"/>').findall(video_data)[0] except: video_url2 = re.compile("NICK.unlock.uri = '(.+?)';").findall(video_data)[0] _main_viacom.play_video(BASE, video_url2, media_base = BASE2)
def play(video_uri = _common.args.url): if BASE in video_uri: video_data = _connection.getURL(video_uri) video_tree = BeautifulSoup(video_data) video_uri = video_tree.find('meta', {'name' : 'mtvn_uri'})['content'] video_url = video_uri _main_viacom.play_video(BASE, video_url)
def play_video(video_url = _common.args.url): video_data = _connection.getURL(video_url) try: mgid = BeautifulSoup(video_data, 'html5lib').find('div', attrs = {'data-mgid' : True})['data-mgid'] video_url2 = mgid except: video_url2 = re.compile('swfobject\.embedSWF\("(.*?)"').findall(video_data)[0] _main_viacom.play_video(BASE, video_url2)
def play_video(video_url = _common.args.url): video_data = _connection.getURL(video_url) try: mgid = BeautifulSoup(video_data, 'html.parser').find('div', attrs = {'data-mgid' : True})['data-mgid'] video_url2 = mgid except: video_url2 = re.compile('swfobject\.embedSWF\("(.*?)"').findall(video_data)[0] if 'southpark' not in video_url2: _main_viacom.play_video(BASE, video_url2) else: sp_id = video_url2.split(':') sp_id2 = sp_id[-1] _main_viacom.play_video(BASE, sp_id2, SOUTHPARKFEED)
def play_video(video_url=_common.args.url): video_data = _connection.getURL(video_url) try: mgid = BeautifulSoup(video_data).find('div', attrs={'data-mgid': True})['data-mgid'] video_url2 = mgid print video_url2 except: video_url2 = re.compile('swfobject\.embedSWF\("(.*?)"').findall( video_data)[0] if 'southpark' not in video_url2: _main_viacom.play_video(BASE, video_url2) else: sp_id = video_url2.split(':') sp_id2 = sp_id[-1] _main_viacom.play_video(BASE, sp_id2, SOUTHPARKFEED)
def play_video(video_uri = _common.args.url): video_data = _connection.getURL(video_uri) video_url = BeautifulSoup(video_data).find('div', id = 'video_player_box')['data-mgid'] _main_viacom.play_video(BASE, video_url)
def play_video(video_url = _common.args.url): video_data = _connection.getURL(video_url) video_url2 = BeautifulSoup(video_data, 'html5lib').find('div', class_ = 'videoShare')['data-unique-id'] _main_viacom.play_video(BASE, video_url2, VIDEOURL)
def play_video(video_uri=_common.args.url): video_data = _connection.getURL(video_uri) video_url = BeautifulSoup(video_data).find( 'div', id='video_player_box')['data-mgid'] _main_viacom.play_video(BASE, video_url)
def play_url(video_uri = _common.args.url): video_data = _connection.getURL(video_uri) video_tree = BeautifulSoup(video_data) video_uri = video_tree.find('link', rel = 'video_src')['href'].split('/')[-1] video_url = video_uri _main_viacom.play_video(BASE, video_url)