static void parseEntries(JSONArray paramJSONArray, List<YouTubeVideo> paramList) throws JSONException { int i = 0; int j = paramJSONArray.length(); if (i >= j) return; JSONObject localJSONObject = paramJSONArray.getJSONObject(i); YouTubeVideo localYouTubeVideo = new YouTubeVideo(localJSONObject); if (!localYouTubeVideo.parse()) Log.i("YouTubeUtils", "Error parsing entry in YouTube feed."); while (true) { i += 1; break; boolean bool = paramList.add(localYouTubeVideo); } }
/** * Get a the appropriate Token for a given URL * * @param text the anchor text * @param url the url */ public static Token tokenForUrl(String url, String text) { if (url == null) { return null; } // Look for video links Video video = Video.matchURL(url, text); if (video != null) { return video; } // Look for video links. YouTubeVideo ytVideo = YouTubeVideo.matchURL(url, text); if (ytVideo != null) { return ytVideo; } // Look for photo links. Photo photo = Photo.matchURL(url, text); if (photo != null) { return photo; } // Look for photo links. FlickrPhoto flickrPhoto = FlickrPhoto.matchURL(url, text); if (flickrPhoto != null) { return flickrPhoto; } // Not media, so must be a regular URL return new Link(url, text); }