def scrape(self, url):
        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 OSError:
            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
Register a model and permission set. It adds several functions to the model:
dataset/ETHPy150Open pyvideo/steve/steve/scrapers.py/YoutubeScraper.scrape--crossover with--dataset/ETHPy150Open callowayproject/django-objectpermissions/objectpermissions/registration.py/register