def episode(self, url, imdb, tvdb, title, premiered, season, episode):
     anime = source_utils.is_anime('show', 'tvdb', tvdb)
     self.anime = anime
     if anime:
         epNo = " " + source_utils.absoluteNumber(tvdb, episode, season)
     else:
         epNo = ' s' + season.zfill(2) + 'e' + episode.zfill(2)
     return [url[0] + epNo, url[1] + epNo, '', anime]
Пример #2
0
	def episode(self, url, imdb, tvdb, title, premiered, season, episode):
		try:
			if url is None:
				return

			cookies = cache.cache_get('alltube_cookie')['value']
			self.anime = source_utils.is_anime('show', 'tvdb', tvdb)
			if self.anime:
				txts = 's01e%02d' % int(source_utils.absoluteNumber(tvdb, episode, season))
			else:
				txts = 's%02de%02d' % (int(season), int(episode))
			result = client.request(url, headers={'Cookie': cookies})
			# result = requests.get(url).content
			result = client.parseDOM(result, 'li', attrs={'class': 'episode'})
			result = [i for i in result if txts in i][0]
			url = client.parseDOM(result, 'a', ret='href')[0]
			url = url.encode('utf-8')
			return url
		except:
			return