def scrape(self, url):
        """Scrapes a url by passing it through youtube-dl"""
        if not is_youtube(url):
            return

        # FIXME: Sometimes youtube-dl takes a *long* time to run. This
        # needs to give indication of progress.
        try:
            output = subprocess.check_output(
                ['youtube-dl', '-j', url],
                stderr=subprocess.STDOUT
            )
        except subprocess.CalledProcessError as cpe:
            raise ScraperError('youtube-dl said "{0}".'.format(cpe.output))
        except __HOLE__:
            raise ScraperError('youtube-dl not installed or not on PATH.')

        # Each line is a single JSON object.
        items = []
        for line in output.splitlines():
            items.append(json.loads(line))

        items = [self.transform_item(item) for item in items]

        return items
dataset/ETHPy150Open pyvideo/steve/steve/scrapers.py/YoutubeScraper.scrape