def _parseRealURL (self, commands): """Get the real url for the video""" video_config_url = unquote (commands[0]) page, newurl = getPage (video_config_url) match = self.video_key_re.search (page) if not match: raise self.URLBuildFailed ("Could not find video url or position key") else: secondary_url = match.group (1) # Follow redirect page, real_url = getPage (secondary_url, read_page=False) return real_url
def _parseRealURL(self, commands): """Get the real url for the video""" video_config_url = unquote(commands[0]) page, newurl = getPage(video_config_url) match = self.video_key_re.search(page) if not match: raise self.URLBuildFailed( "Could not find video url or position key") else: secondary_url = match.group(1) # Follow redirect page, real_url = getPage(secondary_url, read_page=False) return real_url
def _parseRealURL (self, commands): """Get the real url for the video""" secondary_url = commands[0] # Follow redirect page, real_url = getPage (secondary_url, read_page=False) # print real_url return real_url
def _parseRealURL(self, commands): """Get the real url for the video""" secondary_url = commands[0] # Follow redirect page, real_url = getPage(secondary_url, read_page=False) # print real_url return real_url
def getVideoPage(self, account="", password=""): page, newurl = getPage(self.details_url) match = self.extern_content_re.search(page) if match: content_match = self.forward_link_re.search(page) page = "" newurl = content_match.group(1) self.page_dump = page return page, newurl
def getVideoPage (self, account="", password=""): page, newurl = getPage (self.details_url) match = self.extern_content_re.search (page) if match: content_match = self.forward_link_re.search (page) page = "" newurl = content_match.group (1) self.page_dump = page return page, newurl
def _parsePlayerCommands (self): """Get the commands needed to get the video player""" page, newurl = getPage (self.__class__.video_json_url % self.video_id) match = self.__class__.video_url_params_re.search (page) if not match: raise self.__class__.InvalidCommands ("Could not find flash player commands") else: commands = match.groups () return commands
def _parseRealURL (self, commands): """Get the real url for the video""" secondary_url = commands[0] page, newurl = getPage (secondary_url) match = self.__class__.video_url_real_str_re.search (page) if not match: raise self.__class__.URLBuildFailed ("Video URL could not be found at page \"%s\"" % secondary_url) else: real_url = unquote (match.group (1)) return real_url
def getVideoPage(self, account="", password=""): expires_date = datetime.datetime.now() + datetime.timedelta(days=365) # Example expires string: "Fri, 16-Dec-2011 02:15:58 PM" page, newurl = getPage( self.page_url, additional_headers={ "Cookie": r'pp="1"; expires="%s"; path="/"; domain=.redtube.com; secure=""' % expires_date.strftime("%a, %d-%m-%Y %I:%M:%S %p") }) return page, newurl
def _parseRealURL (self, commands): """Get the real url for the video""" video_url_player = self.video_url_player_str % commands page, newurl = getPage (video_url_player) match = self.video_url_mid_re.search (page) if not match: raise self.URLBuildFailed ("Could not find the mediaId") video_url_mid = match.group (1) match = self.video_url_uid_re.search (page) if not match: raise self.URLBuildFailed ("Could not find the userId") video_url_uid = match.group (1) match = self.video_url_mdomain_re.search (page) if not match: raise self.URLBuildFailed ("Could not find the mediaDomain") video_url_mdomain = match.group (1) real_url = self.video_url_real_str % (video_url_mdomain, video_url_uid, video_url_mid) return real_url
def _parseRealURL(self, commands): """Get the real url for the video""" page, newurl = getPage(self.video_url_real_str % commands, read_page=False) real_url = newurl return real_url
def getVideoPage (self, account="", password=""): page, newurl = getPage (self.video_details_str % self.video_id) self.page_dump = page return page, newurl
def getVideoPage (self, account="", password=""): page, newurl = getPage (self.__class__.video_details_url_str % self.video_id) return page, newurl
def getVideoPage(self, account="", password=""): page, newurl = getPage(self.video_enter_url) return page, newurl
def getVideoPage(self, account="", password=""): page, newurl = getPage(self.__class__.video_details_url_str % self.video_id) return page, newurl
def getVideoPage (self, account="", password=""): expires_date = datetime.datetime.now () + datetime.timedelta (days=365) # Example expires string: "Fri, 16-Dec-2011 02:15:58 PM" page, newurl = getPage (self.page_url, additional_headers={"Cookie": r'pp="1"; expires="%s"; path="/"; domain=.redtube.com; secure=""' % expires_date.strftime ("%a, %d-%m-%Y %I:%M:%S %p")}) return page, newurl
def getVideoPage (self, account="", password=""): page, newurl = getPage (self.page_url) page, newurl = getPage (self.page_url, self.video_url_age_post) return page, newurl
def _parseRealURL (self, commands): """Get the real url for the video""" page, newurl = getPage (self.video_url_real_str % commands, read_page=False) real_url = newurl return real_url
def getVideoPage (self): page, newurl = getPage (self.page_url, self.video_url_age_post) page, newurl = getPage (self.page_url) return page, newurl
def getVideoPage(self, account="", password=""): page, newurl = getPage(self.page_url) page, newurl = getPage(self.page_url, self.video_url_age_post) return page, newurl
def getVideoPage (self, account="", password=""): page, newurl = getPage (self.video_enter_url) return page, newurl