Ejemplo n.º 1
0
    def get_sources(self, url, hosthdDict, hostDict, locDict):
        control.log('######### DIZILAB ## %s ' % url)
        try:
            sources = []

            if url == None: return sources

            url = urlparse.urljoin(self.base_link, url)
            #result = client.source(url)
            result = client2.http_get(url)

            try:
                url = re.compile('"episode_player".*?src="([^"]+)"').findall(result)

                links = [(i[0], '1080p') for i in url if int(i[1]) >= 1080]
                links += [(i[0], 'HD') for i in url if 720 <= int(i[1]) < 1080]
                links += [(i[0], 'SD') for i in url if 480 <= int(i[1]) < 720]
                if not 'SD' in [i[1] for i in links]: links += [(i[0], 'SD') for i in url if 360 <= int(i[1]) < 480]

                for i in links: sources.append({'source': 'gvideo', 'quality': i[1], 'provider': 'Dizilab', 'url': i[0]})
            except:
                pass

            try:
                url = client.parseDOM(result, 'iframe', ret='src')
                url = [i for i in url if 'openload.' in i][0]
                sources.append({'source': 'openload.co', 'quality': client.file_quality_openload(url)['quality'], 'provider': 'Dizilab', 'url': url})
            except:
                pass

            return sources

        except:
            return sources
Ejemplo n.º 2
0
    def get_sources(self, url, hosthdDict, hostDict, locDict):
        control.log('######### DIZILAB ## %s ' % url)
        try:
            sources = []

            if url == None: return sources

            url = urlparse.urljoin(self.base_link, url)
            #result = client.source(url)
            result = client2.http_get(url)

            try:
                url = re.compile('"episode_player".*?src="([^"]+)"').findall(
                    result)

                links = [(i[0], '1080p') for i in url if int(i[1]) >= 1080]
                links += [(i[0], 'HD') for i in url if 720 <= int(i[1]) < 1080]
                links += [(i[0], 'SD') for i in url if 480 <= int(i[1]) < 720]
                if not 'SD' in [i[1] for i in links]:
                    links += [(i[0], 'SD') for i in url
                              if 360 <= int(i[1]) < 480]

                for i in links:
                    sources.append({
                        'source': 'gvideo',
                        'quality': i[1],
                        'provider': 'Dizilab',
                        'url': i[0]
                    })
            except:
                pass

            try:
                url = client.parseDOM(result, 'iframe', ret='src')
                url = [i for i in url if 'openload.' in i][0]
                sources.append({
                    'source':
                    'openload.co',
                    'quality':
                    client.file_quality_openload(url)['quality'],
                    'provider':
                    'Dizilab',
                    'url':
                    url
                })
            except:
                pass

            return sources

        except:
            return sources