Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 852041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:31:41+00:00 2026-05-15T07:31:41+00:00

If a YouTube video is set as private and I try to fetch it

  • 0

If a YouTube video is set as private and I try to fetch it using the gdata Python API a 404 RequestError is raised, even though I have done a programmatic login with the account that owns that video:

from gdata.youtube import service
yt_service = service.YouTubeService(email=my_email,
                                    password=my_password,
                                    client_id=my_client_id,
                                    source=my_source,
                                    developer_key=my_developer_key)
yt_service.ProgrammaticLogin()
yt_service.GetYouTubeVideoEntry(video_id='IcVqemzfyYs')
---------------------------------------------------------------------------
RequestError                              Traceback (most recent call last)

<ipython console> 

/usr/lib/python2.4/site-packages/gdata/youtube/service.pyc in GetYouTubeVideoEntry(self, uri, video_id)
    203     elif video_id and not uri:
    204       uri = '%s/%s' % (YOUTUBE_VIDEO_URI, video_id)
--> 205     return self.Get(uri, converter=gdata.youtube.YouTubeVideoEntryFromString)
    206 
    207   def GetYouTubeContactFeed(self, uri=None, username='default'):

/usr/lib/python2.4/site-packages/gdata/service.pyc in Get(self, uri, extra_headers, redirects_remaining, encoding, converter)
   1100             'body': result_body}
   1101     else:
-> 1102       raise RequestError, {'status': server_response.status,
   1103           'reason': server_response.reason, 'body': result_body}
   1104 

RequestError: {'status': 404, 'body': 'Video not found', 'reason': 'Not Found'}

This happens every time, unless I go into my YouTube account (through the YouTube website) and set it public, after that I can set it as private and back to public using the Python API.

Am I missing a step or is there another (or any) way to fetch a YouTube video set as private from the API?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:31:42+00:00Added an answer on May 15, 2026 at 7:31 am

    Apparently the YouTube Data API doesn’t allow this (yet), so to workaround this I use the GetYouTubeUserFeed method of a YouTubeService instance to obtain a list of all the video entries I need (whether they are private or public):

    from gdata.youtube import service
    VIDEO_ID = 'IcVqemzfyYs'
    yt_service = service.YouTubeService(email=my_email,
                                    password=my_password,
                                    client_id=my_client_id,
                                    source=my_source,
                                    developer_key=my_developer_key)
    yt_service.ProgrammaticLogin()
    userfeed = yt_service.GetYouTubeUserFeed(username=my_email[:my_email.index('@')])
    video_entry = reduce(lambda e1, e2: e1 if e1.id.text.endswith(VIDEO_ENTRY) else (e2 if e2.id.text.endswith(VIDEO_ENTRY) else None),
                         userfeed.entry)
    

    Hope this helps anyone having the same problem 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to upload a youtube video using the GData gem (I have
I'm trying to set up a quick PHP demo using the Youtube API that
I’m trying to get the size of a YouTube video. I’m using a Gdata
I am using direct-upload method to upload video to youtube. Video successfully uploads but
Is there a way to set default Youtube video quality when displaying video with
I want to use youtube api to log some statistics about video playing on
I am using the following code to upload a video to Youtube through youtube
I'm using the Zend framework to access the YouTube Data API. The function below
I want to save a set of youtube video links for my website. I
I am trying to set a div over the youtube video.I have tried setting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.