YouTube API commentsThreads() displays that a video disabled comments even though the video has tons of comments

While retrieving comments through YouTube API, I have come across a problem in which the code suggests that a video has disabled comments, thus returning an error, even though I can directly access tons of comments through the video’s link.

from googleapiclient.discovery import build
from googleapiclient.errors import HttpError

youtube = build('youtube', 'v3', developerKey= 'MYAPIKEY')


def fetch_comments(video_id):
    response = youtube.videos().list(part="snippet", id = video_id).execute()
    video_title = response['items'][0]['snippet']['title']
    print(video_title)

    vid_stats = youtube.videos().list(
        part="statistics",
        id=video_id
    ).execute()

    comment_count = vid_stats.get("items")[0].get("statistics").get("commentCount")
    print(comment_count)
    try:
        comments = []
        response = youtube.commentThreads().list(
            part="snippet",
            videoId=video_id,
            maxResults=100,
            order="relevance",
        ).execute()

        for item in response['items']:
            comment = item['snippet']['topLevelComment']['snippet']['textDisplay']
            print(comment)
            comments.append(comment)

    except HttpError as e:
        print(f"An HTTP error occurred: {e}")

video_urls = ['https://www.youtube.com/watch?v=wLSUDSNqLgQ', 'https://www.youtube.com/watch?v=qAqXDZoa624','https://www.youtube.com/watch?v=7wBgcalM4c4' ]
for url in video_urls:
    print(url)
    video_id = url.split('=')[-1]
    fetch_comments(video_id)

I developed a code to display 4 items: The video’s url, video’s title, the number of comments, and top 100 comments ordered by relevance, and the code succeeded in its duty except the fourth task: The code suggests that all three videos in the list (video_urls) has “has disabled comments,” while you can easily see that all three videos actually have their comments available.

Here’s what the output displays:

https://www.youtube.com/watch?v=wLSUDSNqLgQ
Everywhere (2017 Remaster)
432
An HTTP error occurred: <HttpError 403 when requesting https://youtube.googleapis.com/youtube/v3/commentThreads?part=snippet&videoId=wLSUDSNqLgQ&maxResults=100&order=relevance&key=AIzaSyDl-zKEBOx6TAeEZAnX3But1XunhDPOYNA&alt=json returned "The video identified by the <code><a href="/youtube/v3/docs/commentThreads/list#videoId">videoId</a></code> parameter has disabled comments.". Details: "[{'message': 'The video identified by the <code><a href="/youtube/v3/docs/commentThreads/list#videoId">videoId</a></code> parameter has disabled comments.', 'domain': 'youtube.commentThread', 'reason': 'commentsDisabled', 'location': 'videoId', 'locationType': 'parameter'}]">
Bette Davis Eyes 2435 An HTTP error occurred: <HttpError 403 when requesting https://youtube.googleapis.com/youtube/v3/commentThreads?part=snippet&videoId=qAqXDZoa624&maxResults=100&order=relevance&key=AIzaSyDl-zKEBOx6TAeEZAnX3But1XunhDPOYNA&alt=json returned "The video identified by the <code><a href="/youtube/v3/docs/commentThreads/list#videoId">videoId</a></code> parameter has disabled comments.". Details: "[{'message': 'The video identified by the <code><a href="/youtube/v3/docs/commentThreads/list#videoId">videoId</a></code> parameter has disabled comments.', 'domain': 'youtube.commentThread', 'reason': 'commentsDisabled', 'location': 'videoId', 'locationType': 'parameter'}]">
Time After Time 3263

I tried to develop the code to print the total number of comments to check whether making a reference to the comment itself is disabled, but as it turns out to be successful, I reckon it is the problem to do with the function of the code. Please somebody help me…

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật