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

  • Home
  • SEARCH
  • 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 7696333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:45:19+00:00 2026-05-31T21:45:19+00:00

I have a pretty straight forward task – Given the URL of a video,

  • 0

I have a pretty straight forward task –

Given the URL of a video, I want to extract information of its Related videos (and by information I mean their Title, Tags, Description).
I use Java version of the YouTube API and couldn’t find out how to do that quickly. Also, this site: https://developers.google.com/youtube/2.0/developers_guide_java provides some information. The code they provide is:

if (videoEntry.getRelatedVideosLink() != null) {
  String feedUrl = videoEntry.getRelatedVideosLink().getHref();

  VideoFeed videoFeed = service.getFeed(new URL(feedUrl), VideoFeed.class);
  printVideoFeed(videoFeed, true);
}

I don’t know how to create a videoEntry given only the URL..

  • 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-31T21:45:21+00:00Added an answer on May 31, 2026 at 9:45 pm

    You can use this:

            class YouTubeVideoInfo {
                    private String channel;
                    private String url;
                    private long views;
                    private int comments;
                    private int ratings;
                    private int likes;
                    private int dislikes;
                    private String thumbnail;
                    private String title;
                    .....
            }
    
            public static final String YOUTUBE_GDATA_SERVER = "http://gdata.youtube.com";
            public static final String USER_FEED_PREFIX = YOUTUBE_GDATA_SERVER + "/feeds/api/users/";
            public static final String UPLOADS_FEED_SUFFIX = "/uploads";
        ...............
            public YouTubeVideoInfo getVideoInfo(YouTubeService service, String channel, String url) {
    VideoFeed videoFeed = service.getFeed(
            new URL(USER_FEED_PREFIX + channel + UPLOADS_FEED_SUFFIX), VideoFeed.class);
    List<VideoEntry> videoEntries = videoFeed.getEntries();
    for (VideoEntry videoEntry : videoEntries) {
    
        YouTubeMediaGroup mediaGroup = videoEntry.getMediaGroup();
        if (mediaGroup != null && mediaGroup.getPlayer() != null && videoEntry.getTitle() != null) {
    
            if (url.equals(mediaGroup.getPlayer().getUrl())) {
                String title = videoEntry.getTitle().getPlainText();
    
                MediaKeywords keywords = mediaGroup.getKeywords();
    
                MediaPlayer mediaPlayer = mediaGroup.getPlayer();
    
    
                final YtStatistics statistics = videoEntry.getStatistics();
    
                final YouTubeVideoInfo videoInfo = new YouTubeVideoInfo(channel,
                        mediaPlayer.getUrl(), statistics != null
                        ? statistics.getViewCount() : 0);
    
                if (videoEntry.getComments() != null
                        && videoEntry.getComments().getFeedLink() != null)
                    videoInfo.comments =
                            videoEntry.getComments().getFeedLink().getCountHint();
    
                final Rating rating = videoEntry.getRating();
                if (rating != null)
                    videoInfo.ratings = rating.getNumRaters();
    
                final YtRating ytRating = videoEntry.getYtRating();
    
                if (ytRating != null) {
                    videoInfo.likes = ytRating.getNumLikes();
                    videoInfo.dislikes = ytRating.getNumDislikes();
                }
    
    
                final List<MediaThumbnail> thumbnails = mediaGroup.getThumbnails();
                if (!thumbnails.isEmpty())
                    videoInfo.thumbnail = thumbnails.get(thumbnails.size() / 2).getUrl();
    
                if (videoEntry.getTitle() != null)
                    videoInfo.title = videoEntry.getTitle().getPlainText();
    
                return videoInfo;
            }
        }
        .... // exception handling
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pretty straight forward question, I have a GtkEntry widget that I want to set
I have a side project I do = in Java. It's a pretty straight-forward
Pretty straight forward. I have a rectangle with a label over top of it.
So! My question is pretty straight forward, I have a website (Build in ASP.NET
I have a pretty straight forward nested form. Categories has_many awards has_many recommendations. So
I have a pretty straight forward uploadified page that allows users to upload files,
This is a pretty straight-forward problem. I basically have a div block on a
It's a pretty straight forward question. I have my main window in a WPF
It seems pretty straight forward to get what I want. The data details display
My situation is pretty straight forward. I have a server configured with max_allowed_packet set

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.