Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle YouTube API v3 Throwing 503 Backend Error
    primarykey
    data
    text
    <p>I'm working on an application that scrapes songs from certain websites and programmatically "Likes" them on youtube through Google's Youtube API. To obtain the video IDs that I'm looking for, I perform a google search with the artist and song title and parse through the results. This process works fine and returns valid video IDs (I've tested them manually). Where I run into issues is the code I have for "Like"ing something based on a video ID, which is essentially copied directly from google's YouTube API Python example: </p> <pre><code>def likeVideo(youtube, video_id): channels_list_response = youtube.channels().list( mine=True, part="contentDetails" ).execute() # Adding a video as a favorite or to the watch later list is done via the # same basic process. Just read the list id of the corresponding playlist # instead of "likes" as we're doing here. liked_list_id = channels_list_response["items"][0]["contentDetails"]["relatedPlaylists"]["likes"] body = dict( snippet=dict( playlistId=liked_list_id, resourceId=dict( kind="youtube#video", videoId=video_id ) ) ) youtube.playlistItems().insert( part=",".join(body.keys()), body=body ).execute() print "%s has been liked." % video_id </code></pre> <p>However, my app is throwing this error: </p> <pre><code>apiclient.errors.HttpError: &lt;HttpError 503 when requesting https://www.googleapis.com/youtube/v3/playlistItems?alt=json&amp;part=snippet returned "Backend Error"&gt; </code></pre> <p>Searching through google dev forums reveals that this might be a server side issue on Google's part, but I'm not sure for my specific situation. Anyone see what might be wrong? </p> <p>EDIT: I've been using this app in the past few days and it seems to be working somewhat decently; few 503 errors... However, at this point it's usually doing only one API request per session. When I first ran into the error, it was doing a batch of about 6. Is there something that happens when doing batch requests that I should account for? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload