Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Youtube API Comments (Java)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kiran Shah  
View profile  
 More options Jul 12 2012, 5:28 am
From: Kiran Shah <kiranavnishs...@gmail.com>
Date: Thu, 12 Jul 2012 02:28:36 -0700 (PDT)
Local: Thurs, Jul 12 2012 5:28 am
Subject: Youtube API Comments (Java)

I feel quite out of place here, as I'm very very new to programming. I
think this is the right place to ask this question so here I go!

 I was developing a Youtube Application in Java, I thought i had the code
working fine i couldn't see any problems to why it wouldn't work but its
kept throwing this error when i ran the program on large queries:

java.io.IOException <http://www.google.com/search?hl=en&q=allinurl%3Aioexception+java.sun....>: Premature EOF      
        at sun.net.[url]www.http.ChunkedInputStream.readAheadBlocking(Unknown[/url] Source)
        at sun.net.[url]www.http.ChunkedInputStream.readAhead(Unknown[/url] Source)
        at sun.net.[url]www.http.ChunkedInputStream.read(Unknown[/url] Source)
        at java.io.FilterInputStream <http://www.google.com/search?hl=en&q=allinurl%3Afilterinputstream+jav...>.read(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection <http://www.google.com/search?hl=en&q=allinurl%3Ahttpurlconnection+jav...>$HttpInputStream.read(Unknown Source)
        at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
        at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
        at sun.nio.cs.StreamDecoder.read(Unknown Source)
        at java.io.InputStreamReader <http://www.google.com/search?hl=en&q=allinurl%3Ainputstreamreader+jav...>.read(Unknown Source)
        at java.io.BufferedReader <http://www.google.com/search?hl=en&q=allinurl%3Abufferedreader+java.s...>.fill(Unknown Source)
        at java.io.BufferedReader <http://www.google.com/search?hl=en&q=allinurl%3Abufferedreader+java.s...>.readLine(Unknown Source)
        at java.io.BufferedReader <http://www.google.com/search?hl=en&q=allinurl%3Abufferedreader+java.s...>.readLine(Unknown Source)
        at Youtube1.main(Youtube1.java:40)

So after asking a lot of people why my program was doing this, i got very few answers but many people said to use the API, as before i was just using the direct youtube URL (which i was recently told is against their TOS).

But when I use the Youtube API's comment feed URL:

http://gdata.youtube.com/feeds/api/videos/8aYQ_wjmxiQ/comments

it will only display about 25 comments of that video, I was wondering is there a way to access the all_comments part? and/or navigate through the Youtube Comment pages?

I hope I'm not missing something obvious. And im sorry if this sounds like a stupid question, I'm just new to programming s'all.

Thanks for your help! hopefully i can stop this darn error if i get this to work :).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kiran Shah  
View profile  
 More options Jul 13 2012, 5:46 am
From: Kiran Shah <kiranavnishs...@gmail.com>
Date: Fri, 13 Jul 2012 02:46:42 -0700 (PDT)
Local: Fri, Jul 13 2012 5:46 am
Subject: Youtube API Comments (Java)

So I read that YouTubes API has a limit of 50 results at a time but it's defaulted at 25 how can bypass this 50 result limit in java... This is very annoying.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kiran Shah  
View profile  
 More options Jul 15 2012, 5:13 am
From: Kiran Shah <kiranavnishs...@gmail.com>
Date: Sun, 15 Jul 2012 02:13:36 -0700 (PDT)
Local: Sun, Jul 15 2012 5:13 am
Subject: Re: Youtube API Comments (Java)

bump?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
api  
View profile  
 More options Jul 15 2012, 10:14 am
From: api <music...@live.nl>
Date: Sun, 15 Jul 2012 07:14:48 -0700 (PDT)
Local: Sun, Jul 15 2012 10:14 am
Subject: Re: Youtube API Comments (Java)

On the left side menu are links to the guides where you can find the
information you ask: the parameters one can use. See:
https://developers.google.com/youtube/2.0/developers_guide_java
https://developers.google.com/youtube/2.0/reference

Anyway, use start-index to advance and max-results=50 like in:

http://gdata.youtube.com/feeds/api/videos/qszv3RFtN4o/comments?v=2&ma...<http://gdata.youtube.com/feeds/api/videos/qszv3RFtN4o/comments?v=2&ma...>

There is also an upper limit (i think 1000).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kiran Shah  
View profile  
 More options Jul 15 2012, 11:37 am
From: Kiran Shah <kiranavnishs...@gmail.com>
Date: Sun, 15 Jul 2012 08:37:06 -0700 (PDT)
Local: Sun, Jul 15 2012 11:37 am
Subject: Re: Youtube API Comments (Java)

Anyway to get past 1000? like i need all the comments on a video?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kiran Shah  
View profile  
 More options Jul 15 2012, 11:59 am
From: Kiran Shah <kiranavnishs...@gmail.com>
Date: Sun, 15 Jul 2012 08:59:19 -0700 (PDT)
Local: Sun, Jul 15 2012 11:59 am
Subject: Re: Youtube API Comments (Java)
 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »