def _get_history(self): video_id = self.url.rstrip("/").rpartition("/")[2] self.logger.debug("Testing if video exist") history_url = 'http://www.filmon.us/video/history/hid/' + video_id if http.url_resolve(prepend_www(history_url)) == "http://www.filmon.us/channels": raise PluginError("history number " + video_id + " don't exist") self.logger.debug("Fetching video URL") res = http.get(history_url) match = re.search("http://cloud.battlecam.com/([/\w]+).flv", res.text) if not match: return url = match.group(0) return HTTPStream(self.session, url)
def _get_history(self): video_id = self.url.rstrip("/").rpartition("/")[2] self.logger.debug("Testing if video exist") history_url = 'http://www.filmon.us/video/history/hid/' + video_id if urlresolve(prepend_www(history_url)) == '/': raise PluginError("history number " + video_id + " don't exist") self.logger.debug("Fetching video URL") res = urlget(history_url) match = re.search("http://cloud.battlecam.com/([/\w]+).flv", res.text) if not match: return url = match.group(0) return HTTPStream(self.session, url)
def _get_stream_upload(self): video = urlparse(self.url).path if http.resolve_url(prepend_www(self.url)) == 'http://www.filmon.us/channels': raise PluginError(video + " don't exist") playpath = "mp4:resources" + video + '/v_3.mp4' rtmp = RTMP_UPLOAD_URL parsed = urlparse(rtmp) app = parsed.path[1:] return RTMPStream(self.session, { "rtmp": rtmp, "pageUrl": self.url, "swfUrl": SWF_UPLOAD_URL, "playpath": playpath, "app": app, "live": True })
def _get_stream_upload(self): video = urlparse(self.url).path if http.resolve_url(prepend_www( self.url)) == 'http://www.filmon.us/channels': raise PluginError(video + " don't exist") playpath = "mp4:resources" + video + '/v_3.mp4' rtmp = RTMP_UPLOAD_URL parsed = urlparse(rtmp) app = parsed.path[1:] return RTMPStream( self.session, { "rtmp": rtmp, "pageUrl": self.url, "swfUrl": SWF_UPLOAD_URL, "playpath": playpath, "app": app, "live": True })