package feedmeyoutubecrawler.crawler;

import feedmeyoutubecore.obj.YouTubeVideo;
import java.io.IOException;
import java.util.List;

/* Copyright (C) 2015 Robert Lehmann <lehmrob@gmail.com>
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 */
/**
 * This is the main crawler class which runs the crawler
 *
 * @author Robert Lehmann
 * @since 1.0
 */
public class Crawler {

    private final VideoCrawler _videoCrawler;

    /**
     * Constructor for the {@link Crawler}
     *
     * @throws IOException Error occurs during authorisation of the craweler
     * @since 1.0
     */
    public Crawler() throws IOException {
        _videoCrawler = new VideoCrawler();
    }

    /**
     * Crawl the information from the youtube account
     *
     * @throws IOException Can't connect to YouTube.
     * @since 1.0
     */
    public void crawl() throws IOException {
        final List<YouTubeVideo> list = _videoCrawler.getNextVideos();
        System.out.println(list);
    }
}

@@ -32,16 +32,59 @@
 awler;%0A%0A
+import feedmeyoutubecore.ExistenceChecker;%0A
 import f
@@ -146,16 +146,44 @@
 eption;%0A
+import java.util.ArrayList;%0A
 import j
@@ -1055,38 +1055,276 @@
 t = 
-_videoCrawler.getNextVideos();
+new ArrayList%3C%3E();%0A        %0A        while (_videoCrawler.hasNext()) %7B%0A            System.out.println(%22Next%22);%0A            list.addAll(_videoCrawler.getNextVideos());%0A        %7D%0A        %0A        list.stream().forEach(video -%3E ExistenceChecker.CheckItem(video));%0A        
 %0A   

Add construct for crawling all uploads