YouTube clipper

Here is a simple clipper intended to be used with YouTube to pull basic video info

{
"schemaVersion": 3,
"fieldMappings": [
    {
        "fieldName": "Video Title",
        "fieldType": "singleLineText",
        "defaultValue": {
            "type": "cssSelector",
            "opts": {
                "cssSelector": "h1.title"
            }
        }
    },
    {
        "fieldName": "Video Description",
        "fieldType": "multilineText",
        "defaultValue": {
            "type": "cssSelector",
            "opts": {
                "cssSelector": "#description > yt-formatted-string"
            }
        }
    },
    {
        "fieldName": "Video URL",
        "fieldType": "singleLineText",
        "defaultValue": {
            "type": "pageUrl",
            "opts": null
        }
    },
    {
        "fieldName": "Video Duration",
        "fieldType": "singleLineText",
        "defaultValue": {
            "type": "cssSelector",
            "opts": {
                "cssSelector": "#movie_player > div.ytp-chrome-bottom > div.ytp-chrome-controls > div.ytp-left-controls > div > span.ytp-time-duration"
            }
        }
    },
    {
        "fieldName": "View Count",
        "fieldType": "singleLineText",
        "defaultValue": {
            "type": "cssSelector",
            "opts": {
                "cssSelector": "#count > yt-view-count-renderer > span.view-count.style-scope.yt-view-count-renderer"
            }
        }
    }
]

}

3 Likes

Hey Chris. Two quick question if you have time:

  • What would be the code to populate the channel URL instead of video URL?

  • Is there a way to populate a field in Airtable with the email address a user lists on their channel’s About page?

Many thanks in advance.

I am not sure how to clip the email address from the YT about page; but it looks like you can clip the YT channel URL by using HTML attribute by CSS selector with the following values
CSS selector: a.ytd-video-owner-renderer
Attribute name: href

1 Like