def get_sources(self, video):
        source_url=self.get_url(video)
        hosters = []
        if source_url:
            url = urlparse.urljoin(self.base_url, source_url)
            html = self._http_get(url, cache_limit=.5)
            match = re.search(',(http.*?proxy\.swf)&proxy\.link=([^&]+)', html)            
            if match:
                swf_link, proxy_link = match.groups()
                swf_link = swf_link.replace('proxy.swf', '')
                if proxy_link.startswith('http'):
                    xml_link = swf_link + 'pluginslist.xml'
                    html = self._http_get(xml_link, cache_limit=0)
                    match = re.search('url="(.*?)n.swf', html)
                    if match:
                        player_url = match.group(1)
                        url = swf_link + player_url + 'plugins_player.php'
                        data = {'url': proxy_link, 'isslverify': 'true', 'ihttpheader': 'true', 'iheader': 'true', 'iagent': USER_AGENT}
                        html = self._http_get(url, data=data, cache_limit=0)
                        if 'fmt_stream_map' in html:
                            sources = self.__parse_fmt(html)
                        else:
                            sources = self.__parse_fmt2(html)

                        if sources:
                            for source in sources:
                                hoster = {'multi-part': False, 'url': source, 'class': self, 'quality': sources[source], 'host': 'shush.se', 'rating': None, 'views': None, 'direct': True}
                                hosters.append(hoster)
                else:
                    proxy_link = proxy_link.split('*', 1)[-1]
                    stream_url = GKDecrypter.decrypter(198,128).decrypt(proxy_link, base64.urlsafe_b64decode('djRBdVhhalplRm83akFNZ1VOWkI='),'ECB').split('\0')[0]
                    hoster = {'multi-part': False, 'url': stream_url, 'class': self, 'quality': QUALITIES.HIGH, 'host': urlparse.urlsplit(stream_url).hostname, 'rating': None, 'views': None, 'direct': True}
                    hosters.append(hoster)
         
        return hosters
Esempio n. 2
0
    def get_sources(self, video):
        source_url = self.get_url(video)
        hosters = []
        if source_url:
            url = urlparse.urljoin(self.base_url, source_url)
            html = self._http_get(url, cache_limit=.5)
            quality = QUALITIES.LOW
            match = re.search('class="status">([^<]+)', html)
            if match:
                quality = QUALITY_MAP.get(match.group(1), QUALITIES.LOW)

            views = None
            match = re.search('Views:</dt>\s*<dd>(\d+)', html, re.DOTALL)
            if match:
                views = match.group(1)

            match = re.search('href="([^"]+)"\s*class="btn-watch"', html)
            if match:
                html = self._http_get(match.group(1), cache_limit=.5)

                match = re.search('proxy\.link":\s*"([^"&]+)', html)
                if match:
                    proxy_link = match.group(1)
                    proxy_link = proxy_link.split('*', 1)[-1]
                    stream_url = GKDecrypter.decrypter(198, 128).decrypt(
                        proxy_link,
                        base64.urlsafe_b64decode(
                            'NlFQU1NQSGJrbXJlNzlRampXdHk='),
                        'ECB').split('\0')[0]
                    if 'picasaweb' in stream_url:
                        html = self._http_get(stream_url, cache_limit=.5)
                        sources = self.__parse_google(html)
                        if sources:
                            for source in sources:
                                hoster = {
                                    'multi-part': False,
                                    'url': source,
                                    'class': self,
                                    'quality': sources[source],
                                    'host': 'zumvo.com',
                                    'rating': None,
                                    'views': views,
                                    'direct': True
                                }
                                hosters.append(hoster)
                    else:
                        hoster = {
                            'multi-part': False,
                            'url': stream_url,
                            'class': self,
                            'quality': quality,
                            'host': urlparse.urlsplit(stream_url).hostname,
                            'rating': None,
                            'views': views,
                            'direct': False
                        }
                        hosters.append(hoster)

        return hosters
Esempio n. 3
0
    def get_sources(self, video):
        source_url = self.get_url(video)
        hosters = []
        if source_url:
            url = urlparse.urljoin(self.base_url, source_url)
            html = self._http_get(url, cache_limit=.5)

            if re.search('<span[^>]+>\s*Low Quality\s*</span>', html):
                quality = QUALITIES.LOW
            else:
                quality = QUALITIES.HIGH

            pattern = '<div id="cont(.*?)</div>'
            for match in re.finditer(pattern, html, re.DOTALL):
                link_fragment = match.group(1)
                match = re.search('<iframe.*?src="([^"]+)', link_fragment)
                if match:
                    stream_url = match.group(1)
                    direct = False
                else:
                    match = re.search('proxy\.link=([^"&]+)', link_fragment)
                    if match:
                        proxy_link = match.group(1)
                        proxy_link = proxy_link.split('*', 1)[-1]
                        stream_url = GKDecrypter.decrypter(198, 128).decrypt(
                            proxy_link,
                            base64.urlsafe_b64decode(
                                'YVhWN09hU0M4MDRWYXlUQ0lPYmE='),
                            'ECB').split('\0')[0]
                        direct = True
                    else:
                        continue

                # skip these for now till I work out how to extract them
                if 'hqq.tv' in stream_url:
                    continue

                try:
                    host = urlparse.urlsplit(stream_url).hostname.lower()
                except AttributeError:
                    pass
                else:
                    hoster = {
                        'multi-part': False,
                        'url': stream_url,
                        'class': self,
                        'quality': self._get_quality(video, host, quality),
                        'host': host,
                        'rating': None,
                        'views': None,
                        'direct': direct
                    }
                    hosters.append(hoster)
        return hosters
    def get_sources(self, video):
        source_url = self.get_url(video)
        hosters = []
        if source_url:
            url = urlparse.urljoin(self.base_url, source_url)
            html = self._http_get(url, cache_limit=.5)

            views = None
            match = re.search('>Total Views<.*?<span>(\d+)', html)
            if match:
                views = match.group(1)

            seen_urls = []
            for match in re.finditer('proxy\.link\s*=\s*([^&"]+)', html):
                proxy_link = match.group(1)
                proxy_link = proxy_link.split('*', 1)[-1]
                proxy_link = proxy_link.strip()
                stream_url = GKDecrypter.decrypter(198, 128).decrypt(
                    proxy_link,
                    base64.urlsafe_b64decode('dWhhVnA4R3Z5a2N5MWJGUWFmQlI='),
                    'ECB').split('\0')[0]
                host = urlparse.urlsplit(stream_url).hostname

                if host and stream_url not in seen_urls:
                    if 'odnoklassniki.ru' in stream_url:
                        sources = self.parse_format(stream_url)
                        host = 'hdlord.com'
                        direct = True
                    elif 'google.com' in stream_url:
                        sources = self.parse_format2(stream_url)
                        host = 'hdlord.com'
                        direct = True
                    else:
                        sources = [{
                            'url': stream_url,
                            'quality': QUALITIES.HD
                        }]
                        direct = False

                    for source in sources:
                        hoster = {
                            'multi-part': False,
                            'class': self,
                            'host': host,
                            'rating': None,
                            'views': views,
                            'direct': direct
                        }
                        hoster.update(source)
                        hosters.append(hoster)
                seen_urls.append(stream_url)

        return hosters
Esempio n. 5
0
    def get_sources(self, video):
        source_url = self.get_url(video)
        hosters = []
        if source_url:
            url = urlparse.urljoin(self.base_url, source_url)
            html = self._http_get(url, cache_limit=0.5)

            if re.search("<span[^>]+>\s*Low Quality\s*</span>", html):
                quality = QUALITIES.LOW
            else:
                quality = QUALITIES.HIGH

            pattern = '<div id="cont(.*?)</div>'
            for match in re.finditer(pattern, html, re.DOTALL):
                link_fragment = match.group(1)
                match = re.search('<iframe.*?src="([^"]+)', link_fragment)
                if match:
                    stream_url = match.group(1)
                    direct = False
                else:
                    match = re.search('proxy\.link=([^"&]+)', link_fragment)
                    if match:
                        proxy_link = match.group(1)
                        proxy_link = proxy_link.split("*", 1)[-1]
                        stream_url = (
                            GKDecrypter.decrypter(198, 128)
                            .decrypt(proxy_link, base64.urlsafe_b64decode("YVhWN09hU0M4MDRWYXlUQ0lPYmE="), "ECB")
                            .split("\0")[0]
                        )
                        direct = True
                    else:
                        continue

                # skip these for now till I work out how to extract them
                if "hqq.tv" in stream_url:
                    continue

                hoster = {
                    "multi-part": False,
                    "url": stream_url,
                    "class": self,
                    "quality": quality,
                    "host": urlparse.urlsplit(stream_url).hostname,
                    "rating": None,
                    "views": None,
                    "direct": direct,
                }
                hosters.append(hoster)
        # print hosters
        return hosters
Esempio n. 6
0
 def get_sources(self, video):
     source_url=self.get_url(video)
     hosters = []
     if source_url:
         url = urlparse.urljoin(self.base_url, source_url)
         html = self._http_get(url, cache_limit=.5)
         
         match = re.search('proxy\.link=([^"&]+)', html)
         if match:
             proxy_link = match.group(1)
             proxy_link = proxy_link.split('*', 1)[-1]
             stream_url = GKDecrypter.decrypter(198,128).decrypt(proxy_link, base64.urlsafe_b64decode('bW5pcUpUcUJVOFozS1FVZWpTb00='),'ECB').split('\0')[0]
             if 'vk.com' in stream_url.lower():
                 hoster = {'multi-part': False, 'host': 'vk.com', 'class': self, 'url': stream_url, 'quality': QUALITIES.HD, 'views': None, 'rating': None, 'direct': False}
                 hosters.append(hoster)
     return hosters
Esempio n. 7
0
    def get_sources(self, video):
        source_url = self.get_url(video)
        hosters = []
        if source_url:
            url = urlparse.urljoin(self.base_url, source_url)
            html = self._http_get(url, cache_limit=.5)

            if re.search('<span[^>]+>\s*Low Quality\s*</span>', html):
                quality = QUALITIES.LOW
            else:
                quality = QUALITIES.HIGH

            pattern = '<div id="cont(.*?)</div>'
            for match in re.finditer(pattern, html, re.DOTALL):
                link_fragment = match.group(1)
                match = re.search('<iframe.*?src="([^"]+)', link_fragment)
                if match:
                    stream_url = match.group(1)
                    direct = False
                else:
                    match = re.search('proxy\.link=([^"&]+)', link_fragment)
                    if match:
                        proxy_link = match.group(1)
                        proxy_link = proxy_link.split('*', 1)[-1]
                        stream_url = GKDecrypter.decrypter(198, 128).decrypt(proxy_link, base64.urlsafe_b64decode('YVhWN09hU0M4MDRWYXlUQ0lPYmE='), 'ECB').split('\0')[0]
                        direct = True
                    else:
                        continue

                # skip these for now till I work out how to extract them
                if 'hqq.tv' in stream_url:
                    continue

                try:
                    host = urlparse.urlsplit(stream_url).hostname.lower()
                except AttributeError:
                    pass
                else:
                    hoster = {'multi-part': False, 'url': stream_url, 'class': self, 'quality': self._get_quality(video, host, quality), 'host': host, 'rating': None, 'views': None, 'direct': direct}
                    hosters.append(hoster)
        return hosters
Esempio n. 8
0
    def get_sources(self, video):
        source_url= self.get_url(video)
        hosters=[]
        if source_url:
            url = urlparse.urljoin(self.base_url,source_url)
            html = self._http_get(url, cache_limit=.5)
            quality = QUALITIES.LOW
            match = re.search('class="status">([^<]+)', html)
            if match:
                quality = QUALITY_MAP.get(match.group(1), QUALITIES.LOW)
            
            views = None
            match = re.search('Views:</dt>\s*<dd>(\d+)', html, re.DOTALL)
            if match:
                views = match.group(1)

            match = re.search('href="([^"]+)"\s*class="btn-watch"', html)
            if match:
                html = self._http_get(match.group(1), cache_limit=.5)
            
                    
                match = re.search('proxy\.link":\s*"([^"&]+)', html)
                if match:
                    proxy_link = match.group(1)
                    proxy_link = proxy_link.split('*', 1)[-1]
                    stream_url = GKDecrypter.decrypter(198,128).decrypt(proxy_link, base64.urlsafe_b64decode('NlFQU1NQSGJrbXJlNzlRampXdHk='),'ECB').split('\0')[0]
                    if 'picasaweb' in stream_url:
                        html = self._http_get(stream_url, cache_limit=.5)                    
                        sources = self.__parse_google(html)
                        if sources:
                            for source in sources:
                                hoster = {'multi-part': False, 'url': source, 'class': self, 'quality': sources[source], 'host': 'zumvo.com', 'rating': None, 'views': views, 'direct': True}
                                hosters.append(hoster)
                    else:
                        hoster = {'multi-part': False, 'url': stream_url, 'class': self, 'quality': quality, 'host': urlparse.urlsplit(stream_url).hostname, 'rating': None, 'views': views, 'direct': False}
                        hosters.append(hoster)
                        
        return hosters
Esempio n. 9
0
    def get_sources(self, video):
        source_url=self.get_url(video)
        hosters = []
        if source_url:
            url = urlparse.urljoin(self.base_url, source_url)
            html = self._http_get(url, cache_limit=.5)
            match = re.search('li\s*=\s*"([^"]+)', html)            
            if match:
                proxy_link = match.group(1)
                proxy_link = self.__decode(proxy_link)
                swf_link = 'http://player.shush.tv/ce9raraB57/'
                if proxy_link.startswith('http'):
                    xml_link = swf_link + 'dedR7wRe2.xml'
                    html = self._http_get(xml_link, cache_limit=0)
                    match = re.search('url="(.*?)f.swf', html)
                    if match:
                        player_url = match.group(1)
                        url = urlparse.urljoin(swf_link, player_url) + 'dERAnAnuTugasw.php'
                        data = {'url': proxy_link, 'isslverify': 'true', 'ihttpheader': 'true', 'iheader': 'true', 'iagent': USER_AGENT}
                        html = self._http_get(url, data=data, cache_limit=0)
                        if 'fmt_stream_map' in html:
                            sources = self.__parse_fmt(html)
                        else:
                            sources = self.__parse_fmt2(html)

                        if sources:
                            for source in sources:
                                hoster = {'multi-part': False, 'url': source, 'class': self, 'quality': sources[source], 'host': 'shush.se', 'rating': None, 'views': None, 'direct': True}
                                hosters.append(hoster)
                else:
                    proxy_link = proxy_link.split('*', 1)[-1]
                    stream_url = GKDecrypter.decrypter(198,128).decrypt(proxy_link, base64.urlsafe_b64decode('djRBdVhhalplRm83akFNZ1VOWkI='),'ECB').split('\0')[0]
                    hoster = {'multi-part': False, 'url': stream_url, 'class': self, 'quality': QUALITIES.HIGH, 'host': urlparse.urlsplit(stream_url).hostname, 'rating': None, 'views': None, 'direct': True}
                    hosters.append(hoster)
         
        return hosters