def sources(self, url, hostDict, hostprDict):
		try:
			if url is None:
				return sources
			sources = []
			hostDict = hostprDict + hostDict
			r = getSum.get(url)
			match = getSum.findSum(r)
			for url in match:
				if 'vidcloud' in url:
					result = getSum.get(url)
					match = getSum.findSum(result)
					for link in match:
						link = "https:" + link if not link.startswith('http') else link
						link = requests.get(link).url if 'vidnode' in link else link
						valid, host = source_utils.is_host_valid(link, hostDict)
						if valid:
							quality, info = source_utils.get_release_quality(link, link)
							sources.append(
								{'source': host, 'quality': quality, 'language': 'en', 'info': info, 'url': link,
								 'direct': False, 'debridonly': False})
				else:
					valid, host = source_utils.is_host_valid(url, hostDict)
					if valid:
						quality, info = source_utils.get_release_quality(url, url)
						sources.append({'source': host, 'quality': quality, 'language': 'en', 'info': info, 'url': url,
						                'direct': False, 'debridonly': False})
			return sources
		except:
			return sources
Пример #2
0
 def sources(self, url, hostDict, hostprDict):
     try:
         sources = []
         if url is None:
             return sources
         hostDict = hostprDict + hostDict
         r = getSum.get(url, Type='cfscrape')
         qual = getSum.findThat(r, 'class="quality">(.+?)<')[0]
         quality, info = source_utils.get_release_quality(qual, qual)
         match = getSum.findSum(r)
         for url in match:
             if 'vidcloud' in url:
                 r = getSum.get(url, Type='cfscrape')
                 match = getSum.findSum(r)
                 for url in match:
                     valid, host = source_utils.is_host_valid(url, hostDict)
                     if valid:
                         sources.append({
                             'source': host,
                             'quality': quality,
                             'language': 'en',
                             'info': info,
                             'url': url,
                             'direct': False,
                             'debridonly': False
                         })
             else:
                 valid, host = source_utils.is_host_valid(url, hostDict)
                 if valid:
                     sources.append({
                         'source': host,
                         'quality': quality,
                         'language': 'en',
                         'info': info,
                         'url': url,
                         'direct': False,
                         'debridonly': False
                     })
         return sources
     except:
         source_utils.scraper_error('YESMOVIESGG')
         return sources
 def sources(self, url, hostDict, hostprDict):
     try:
         sources = []
         if url == None:
             return sources
         data = urlparse.parse_qs(url)
         data = dict([(i, data[i][0]) if data[i] else (i, '') for i in data])
         aliases = eval(data['aliases'])
         if 'tvshowtitle' in data:
             ep = data['episode']
             url = '%s/film/%s-season-%01d/watching.html?ep=%s' % (self.base_link, cleantitle.geturl(data['tvshowtitle']), int(data['season']), ep)
             r = client.request(url, timeout='10', output='geturl')
             if url == None:
                 url = self.searchShow(data['tvshowtitle'], data['season'], aliases)
         else:
             url = self.searchMovie(data['title'], data['year'], aliases)
             if url == None:
                 url = '%s/film/%s/watching.html?ep=0' % (self.base_link, cleantitle.geturl(data['title']))
         if url == None:
             raise Exception()
         r = client.request(url, timeout='10')
         r = client.parseDOM(r, 'div', attrs={'class': 'les-content'})
         if 'tvshowtitle' in data:
             ep = data['episode']
             links = client.parseDOM(r, 'a', attrs={'episode-data': ep}, ret='player-data')
         else:
             links = client.parseDOM(r, 'a', ret='player-data')
         for link in links:
             link = "https:" + link if not link.startswith('http') else link
             if 'vidcloud' in link:
                 r = client.request(link, timeout='10')
                 match = getSum.findSum(r)
                 for url in match:
                     url = "https:" + url if not url.startswith('http') else url
                     url = requests.get(url).url if 'api.vidnode' in url else url
                     valid, host = source_utils.is_host_valid(url, hostDict)
                     if valid:
                         quality, info = source_utils.get_release_quality(url, url)
                         sources.append({'source': host, 'quality': quality, 'language': 'en', 'info': info, 'url': url, 'direct': False, 'debridonly': False})
             else:
                 valid, host = source_utils.is_host_valid(link, hostDict)
                 if valid:
                     quality, info = source_utils.get_release_quality(link, link)
                     sources.append({'source': host, 'quality': quality, 'language': 'en', 'info': info, 'url': link, 'direct': False, 'debridonly': False})
         return sources
     except:
         return sources