You should look YouTube Data API v3.
Need a google account then get can get free API key and most also enable API.
Then can parse out video id out of csv and check if it's
Url is build like this.
Then can write code.
Need a google account then get can get free API key and most also enable API.
Then can parse out video id out of csv and check if it's
publicStatsViewable
True or False.Url is build like this.
https://www.googleapis.com/youtube/v3/videos?id={id_of_the_video}&key={your_api_key}&part=status
Then can write code.
import requests from pprint import pprint id_of_video = 'CUNq2_VjRn4' your_api_key = 'xxxxxxxxxxxxxx' url = f'https://www.googleapis.com/youtube/v3/videos?id={id_of_video}&key={your_api_key}&part=status' url_get = requests.get(url) pprint(url_get.json())
Output:{'etag': '"RmznBCICv9YtgWaaa_nWDIH1_GM/XBA-sYAccdJQD803PbrNziArt-U"',
'items': [{'etag': '"RmznBCICv9YtgWaaa_nWDIH1_GM/i4VlXNZUnKWY8OIv_qh-vAbzstI"',
'id': 'CUNq2_VjRn4',
'kind': 'youtube#video',
'status': {'embeddable': True,
'license': 'youtube',
'privacyStatus': 'public',
'publicStatsViewable': True,
'uploadStatus': 'processed'}}],
'kind': 'youtube#videoListResponse',
'pageInfo': {'resultsPerPage': 1, 'totalResults': 1}}
The part needed.>>> url_get.json()['items'][0]['status']['publicStatsViewable'] True