From 0dc602d9e35ab712c3be57e5a0b67ae2a36f2d28 Mon Sep 17 00:00:00 2001 From: Philip Ardery Date: Sat, 14 Mar 2015 14:53:41 -0400 Subject: [PATCH] replaced tabs with spaces in moviestorm IE --- youtube_dl/extractor/moviestorm.py | 46 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/youtube_dl/extractor/moviestorm.py b/youtube_dl/extractor/moviestorm.py index a4981850a..5fceca6b1 100644 --- a/youtube_dl/extractor/moviestorm.py +++ b/youtube_dl/extractor/moviestorm.py @@ -56,13 +56,13 @@ class MovieStormIE(InfoExtractor): _VALID_URL = r'http://moviestorm\.eu/view/(\d+)-watch-(.*)/season-(\d+)/episode-(\d+)' _LINK_FARM = True - # There are no tests for this IE because the links on any given moviestorm - # page can dynamically change, and because the actual download/extraction - # is ultimately preformed by another IE. An example of an acceptable url to - # feed to this IE is: http://moviestorm.eu/view/218-watch-the-simpsons/season-26/episode-1 + # There are no tests for this IE because the links on any given moviestorm + # page can dynamically change, and because the actual download/extraction + # is ultimately preformed by another IE. An example of an acceptable url to + # feed to this IE is: http://moviestorm.eu/view/218-watch-the-simpsons/season-26/episode-1 _TEST = False - # moviestorm's drupal db config is unstable at times + # moviestorm's drupal db config is unstable at times # retry up to 5 times before giving up, 5 second delay # between each retry retry_count = 0 @@ -79,12 +79,12 @@ class MovieStormIE(InfoExtractor): def _real_extract(self, url): # retry loop to capture moviestorm page while True: - if self.retry_count == 0: + if self.retry_count == 0: note = 'Downloading link farm page' else: - note = ('Unstable db connection, retying again in %s seconds ' - '[%s/%s]' % (self.retry_wait, self.retry_count, - self.max_retries)) + note = ('Unstable db connection, retying again in %s seconds ' + '[%s/%s]' % (self.retry_wait, self.retry_count, + self.max_retries)) (_, _, token) = self._parse_target(url) farmpage = self._download_webpage( @@ -95,14 +95,14 @@ class MovieStormIE(InfoExtractor): ) if farmpage.strip() != 'MySQL server has gone away': - break + break if self.retry_count < self.max_retries: - self.retry_count += 1 - sleep(self.retry_wait) + self.retry_count += 1 + sleep(self.retry_wait) else: - msg = 'The moviestorm database is currently unstable. Please try again later.' - raise ExtractorError(msg, expected=True) + msg = 'The moviestorm database is currently unstable. Please try again later.' + raise ExtractorError(msg, expected=True) # scrape WATCH button links from moviestorm page self.to_screen(': Extracting watch page urls') @@ -111,18 +111,18 @@ class MovieStormIE(InfoExtractor): # get direct urls from scraped watch pages self.to_screen(': Extracting direct links from watch pages') for watch_url in watch_urls: - (_, _, token) = self._parse_target(watch_url) - watchpage = self._download_webpage( - watch_url, token, - note=False, - errnote='Unable to download link farm watch page', - fatal=False + (_, _, token) = self._parse_target(watch_url) + watchpage = self._download_webpage( + watch_url, token, + note=False, + errnote='Unable to download link farm watch page', + fatal=False ) if watchpage is not None: - direct_url = MovieStormHTMLParser.extract_direct_url(watchpage) - if direct_url: - self.direct_urls.append(direct_url) + direct_url = MovieStormHTMLParser.extract_direct_url(watchpage) + if direct_url: + self.direct_urls.append(direct_url) self.to_screen(': Passing off farmed links to InfoExtractors') return list(set(self.direct_urls))