KasunL's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
Active Members
Active Posts:
70 (0.05 per day)
Joined:
11-April 11
Profile Views:
834
Last Active:
User is offline Nov 14 2014 06:38 AM
Currently:
Offline

Previous Fields

Country:
SL
OS Preference:
Who Cares
Favorite Browser:
Chrome
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   KasunL has not set their status

Posts I've Made

  1. In Topic: Video uploading problem YT API 2.0

    Posted 11 Nov 2014

    View PosttlhIn`toq, on 11 November 2014 - 07:18 PM, said:

    Doesn't the exception say it all? You're not authorized - so I'm guessing your connection isn't providing valid credentials.


    What does it mean? My Youtube account is alright. Is it a problem of my internet connection? Sorry, noob here.
  2. In Topic: Video uploading problem YT API 2.0

    Posted 11 Nov 2014

    Sorry, i've accidently posted the same twice. Please delete this, Mr.Admin. thanks
  3. In Topic: Not getting ALL the Youtube results (Youtube API 2.0)

    Posted 8 Nov 2014

    Thanks for the reply.

    Gonna learn the newer version after i completed this project, coz much code is already written, and have no time to recode again.

    Ok i'll try to check if there's any result cap.

    Anyway, if someone detects any problem with the code that causing that problem, please point it out!

    Thanks.
  4. In Topic: Not getting ALL the Youtube results (Youtube API 2.0)

    Posted 8 Nov 2014

    Hi

    My app has 4 radio buttons to filter the results by video count: 100, 500, 1000, and 10,000. Now, the first 3 buttons works ok. I get the number of results. But when i select the 10,000 radio button, the program only gives me 2750 result every time. I donno it's a result limit in YouTube API.

    This is the relevant code snippets from the code:

    
            // Initialization
            void YTReq(string appname)
            {
                devkey = "#My_dev_key#";
                YouTubeRequestSettings settings = new YouTubeRequestSettings(appname, devkey);
                settings.PageSize = 50;
                settings.AutoPaging = true;
                settings.Maximum = 10000;
                request = new YouTubeRequest(settings);
            }
    
    .....
    
            // Code for search button
            private void button_search_Click(object sender, EventArgs e)
            {
             .....
             YTReq("YouTube Custom Search");
    
             query = new YouTubeQuery(YouTubeQuery.DefaultVideoUri);
    
             .....
    
             // Code for 10,000 results radio button
             else if (radioButton_Qty10000.Checked == true)
                {
                    qty = 10000;
                    progressBar1.Maximum = 10000;
    
                    MaxRslts = 10000;
                }
            }
    
             // Loop that stops retrieving results at the given limit
             while (startIndex < qty)
                {
                    query.Query = textBox_query.Text;
                    query.SafeSearch = YouTubeQuery.SafeSearchValues.None;
                    query.StartIndex = startIndex;
                    query.NumberToRetrieve = 50;
    
                    Feed<Video> videoFeed = request.Get<Video>(query);
    
                    printVideoFeed(videoFeed);
    
                    startIndex += 50;
                }
    
              // Methods that outputs the result into a listbox
              void printVideoFeed(Feed<Video> feed)
              {
                .......
    
                    // Filter by results n //
                    foreach (Video entry in feed.Entries)
                    {
                      ........
    
                      // Breaks the loop if the results hits 10,000
                        else if (radioButton_Qty10000.Checked == true)
                        {
                            if (listBox_result.Items.Count == 10000)
                                return;
                        }
                      ..........
      
                      resultsn++;
                      printVideoEntry(entry);
    
                    }
    
               }
    
               void printVideoEntry(Video video)
               {
                 ...........
                 
                 listBox_result.Items.Add(resultsn + ". " + video.Title);
    
                 ...........
               }
           }
    
          
    
    


    Can anyone please detect why i'm not getting my 10,000 results, but stuck at 2750?

    Thanks for any help!
  5. In Topic: Not getting ALL the Youtube results (Youtube API 2.0)

    Posted 5 Nov 2014

    View PostSkydiver, on 05 November 2014 - 07:41 PM, said:

    Also verify the YouTubeRequestSettings.Maximum is more than 500. (See documentation http://google-gdata....estSettings.htm )


    That worked! Thank you so much! I'v been trying to figure out my problem for two days.

    View PostSkydiver, on 05 November 2014 - 07:41 PM, said:

    As an aside, I see on Developer's Guide for the API that v2 has been deprecated and that you should be using v3.


    Yeah, i know, need to learn the new version soon. thanks

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

KasunL hasn't added any friends yet.

Comments

Page 1 of 1
  1. Photo

    ubunta Icon

    30 Sep 2012 - 23:31
    hello how you are????????????????
Page 1 of 1