How to use the tubeup.TubeUp.TubeUp.create_archive_org_metadata_from_youtubedl_meta function in tubeup

To help you get started, we’ve selected a few tubeup examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bibanon / tubeup / tests / test_tubeup.py View on Github external
def test_create_archive_org_metadata_from_youtubedl_meta_no_date(self):
        with open(get_testfile_path(
                'Mountain_3_-_Video_Background_HD_1080p-6iRV8liah8A.'
                'info_no_date.json')
        ) as f:
            vid_meta = json.load(f)

        result = TubeUp.create_archive_org_metadata_from_youtubedl_meta(
            vid_meta
        )

        upload_date = time.strftime("%Y-%m-%d")
        upload_year = time.strftime("%Y")

        expected_result = {
            'mediatype': 'movies',
            'creator': 'Video Background',
            'collection': 'opensource_movies',
            'title': 'Mountain 3 - Video Background HD 1080p',
            'description': ('Mountain 3 - Video Background HD 1080p\n'
                            'If you use this video please put credits to my '
                            'channel in description:\nhttps://www.youtube.com'
                            '/channel/UCWpsozCMdAnfI16rZHQ9XDg\n© Don\'t '
                            'forget to SUBSCRIBE, LIKE, COMMENT and RATE. '
github bibanon / tubeup / tests / test_tubeup.py View on Github external
def test_create_archive_org_metadata_from_youtubedl_meta_no_uploader(self):
        with open(get_testfile_path(
                'Mountain_3_-_Video_Background_HD_1080p-6iRV8liah8A.info_no_'
                'uploader.json')
        ) as f:
            vid_meta = json.load(f)

        result = TubeUp.create_archive_org_metadata_from_youtubedl_meta(
            vid_meta
        )

        expected_result = {
            'mediatype': 'movies',
            'creator': 'http://www.youtube.com/channel/UCWpsozCMdAnfI16rZHQ9XDg',
            'collection': 'opensource_movies',
            'title': 'Mountain 3 - Video Background HD 1080p',
            'description': ('Mountain 3 - Video Background HD 1080p\n'
                            'If you use this video please put credits to my '
                            'channel in description:\nhttps://www.youtube.com'
                            '/channel/UCWpsozCMdAnfI16rZHQ9XDg\n© Don\'t '
                            'forget to SUBSCRIBE, LIKE, COMMENT and RATE. '
                            'Hope you all enjoy! <br><br>Source: '
                            '<a href="https://www.youtube.com/watch?v='
                            '6iRV8liah8A">https://www.youtube.com/watch?v='</a>
github bibanon / tubeup / tests / test_tubeup.py View on Github external
def test_create_archive_org_metadata_from_youtubedl_meta(self):
        with open(get_testfile_path(
                'Mountain_3_-_Video_Background_HD_1080p-6iRV8liah8A.info.json')
                ) as f:
            vid_meta = json.load(f)

        result = TubeUp.create_archive_org_metadata_from_youtubedl_meta(
            vid_meta
        )

        expected_result = {
            'mediatype': 'movies',
            'creator': 'Video Background',
            'collection': 'opensource_movies',
            'title': 'Mountain 3 - Video Background HD 1080p',
            'description': ('Mountain 3 - Video Background HD 1080p\n'
                            'If you use this video please put credits to my '
                            'channel in description:\nhttps://www.youtube.com'
                            '/channel/UCWpsozCMdAnfI16rZHQ9XDg\n© Don\'t '
                            'forget to SUBSCRIBE, LIKE, COMMENT and RATE. '
                            'Hope you all enjoy! <br><br>Source: '
                            '<a href="https://www.youtube.com/watch?v='
                            '6iRV8liah8A">https://www.youtube.com/watch?v='</a>