2   Important note

If you enter Query, it is actually more like a filter on results of a page, meaning? For example, you click on search button with number of results is 20, YouTube will use that querying string to filter first 20 videos of all videos before returns the results. If all 20 videos are not matched, it returns no videos. Say, the 21st video, which is paged in second page, is matched, you have to click next page for second page, so you can get that video in results. My 2 cents: I have no idea what the YouTube developers were thinking about the definition of querying, probably the reason q is not supported in version 2 API.

I made this because sometimes I need to find a video I have favored but I couldn’t recall the exact name. I used to go through all my favorites and still couldn’t find one. With this, it could be a little bit easier.

If I use HTML5 database to download all favorites, I get rid of the problem mentioned in the note above, but I’m lazy.

3   Updates

3.1   Fix pagination and have fast pagination

Thanks to the comments by Lename7, it explains another issue with YouTube API.

In previous code, the code will use next/previous link prepared by the API. But when the queried page doesn’t have any results, then the next/previous navigation link will not be included even there are matched videos in other pages. I have re-coded a bit, so you can manually input the page number, it will be helpful if you want to fast forward quickly when you have <ins>near</ins> 1,000<del>+</del> favorites. Note that the modified code does not check if the page number lies within valid page ranges.

Also, the layout changed a little, all three thumbnails of each video are showed below the entry.

2012-03-01T06:56:22Z, edited at 2013-04-29T14:44:56Z, see below.

3.2   No results after 1,000th video

A comment from thetruelime prompted me to look into the limitation of the number of search results. After read the documentation of API and a bug report, it’s not possible to retrieve videos after 1000th video. In short words, first 1,000 videos are all you can get.

2013-04-29T14:44:56Z