コード例 #1
0
ファイル: imports.py プロジェクト: bluezone/mirocommunity
    def create_vidscraper_video(self, url='http://youtube.com/watch/?v=fake',
                                loaded=True, embed_code='hi', title='Test',
                                **field_data):
        video = VidscraperVideo(url)
        video._loaded = loaded
        field_data.update({'embed_code': embed_code, 'title': title})
        for key, value in field_data.items():
            setattr(video, key, value)

        return video
コード例 #2
0
    def create_vidscraper_video(self,
                                url='http://youtube.com/watch/?v=fake',
                                loaded=True,
                                embed_code='hi',
                                title='Test',
                                **field_data):
        video = VidscraperVideo(url)
        video._loaded = loaded
        field_data.update({'embed_code': embed_code, 'title': title})
        for key, value in field_data.items():
            setattr(video, key, value)

        return video
コード例 #3
0
ファイル: __init__.py プロジェクト: stephenjudge/vidscraper
def auto_scrape(url, fields=None, api_keys=None):
    """
    Automatically determines which suite to use and scrapes ``url`` with that
    suite.

    :returns: :class:`.Video` instance.

    :raises errors.CantIdentifyUrl: if this is not a url that can be
        scraped.

    """
    video = Video(url, fields=fields, api_keys=api_keys)
    video.load()
    return video