Ejemplo n.º 1
0
    def _get_set_info(self, setid, leagueid, vjoinid, quality, conid, referer=None):
        vod_key = (leagueid, vjoinid, quality, conid)

        if vod_key not in self.vod_sets:
            url = "http://www.gomtv.net/gox/ggox.gom?&target=vod&leagueid=%s&vjoinid=%s&strLevel=%s&conid=%s" % vod_key
            r = self._request(url)
            if "ErrorMessage" in r:
                return None, None
            
            urls = re.findall("href=\"(.*)\"", r)
            for url in urls:
                url = url.replace("&", "&")
                url_vjoinid = re.search("vjoinid=([0-9]+)",url).group(1)
                url_vod_key = (leagueid, url_vjoinid, quality, conid)
                uno = re.search("uno=([0-9]+)", url).group(1)
                nodeid = re.search("nodeid=([0-9]+)", url).group(1)
                ip = re.search("USERIP>([0-9.]+)", r).group(1)
                remote_ip = re.search("//([0-9.]+)/", url).group(1)

                if self.use_proxy:
                  url = proxy.url({'payload': "Login,0,%s,%s,%s\n" % (uno, nodeid, ip),'dest': url})
                else:
                  key = self._get_stream_key(remote_ip, uno, nodeid, ip)
                  url = url + "&key=" + key

                self.vod_sets[url_vod_key] = (url,None)
        if self.use_proxy:
          return self.vod_sets[vod_key]
        else:
          return self.vod_sets.pop(vod_key)
Ejemplo n.º 2
0
    def _get_set_info(self,
                      setid,
                      leagueid,
                      vjoinid,
                      quality,
                      conid,
                      referer=None):
        vod_key = (leagueid, vjoinid, quality, conid)

        if vod_key not in self.vod_sets:
            url = "http://www.gomtv.net/gox/ggox.gom?&target=vod&leagueid=%s&vjoinid=%s&strLevel=%s&conid=%s" % vod_key
            r = self._request(url)
            if "ErrorMessage" in r:
                return None, None

            urls = re.findall("href=\"(.*)\"", r)
            for url in urls:
                url = url.replace("&", "&")
                url_vjoinid = re.search("vjoinid=([0-9]+)", url).group(1)
                url_vod_key = (leagueid, url_vjoinid, quality, conid)
                uno = re.search("uno=([0-9]+)", url).group(1)
                nodeid = re.search("nodeid=([0-9]+)", url).group(1)
                ip = re.search("USERIP>([0-9.]+)", r).group(1)
                remote_ip = re.search("//([0-9.]+)/", url).group(1)

                if self.use_proxy:
                    url = proxy.url({
                        'payload':
                        "Login,0,%s,%s,%s\n" % (uno, nodeid, ip),
                        'dest':
                        url
                    })
                else:
                    key = self._get_stream_key(remote_ip, uno, nodeid, ip)
                    url = url + "&key=" + key

                self.vod_sets[url_vod_key] = (url, None)
        if self.use_proxy:
            return self.vod_sets[vod_key]
        else:
            return self.vod_sets.pop(vod_key)
Ejemplo n.º 3
0
 def get_proxy_url(self):
     href, remote_ip, payload = self._get_href()
     return href and proxy.url(href, payload)
Ejemplo n.º 4
0
 def get_proxy_url(self):
     href, remote_ip, payload = self._get_href()
     return href and proxy.url(href, payload)