package feedmeyoutubecrawler;

/* 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.
 */

import feedmeyoutubecrawler.crawler.Crawler;
import feedmeyoutubecore.Version;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Main class which runs the main application.
 * @author Robert Lehmann
 * @since 1.0
 */
public class Main
{
    private static final Logger LOG = LoggerFactory.getLogger(Main.class);

    public static void main(String[] arg)
    {
        LOG.debug("Starting App in Version {}", Version.VERSION);
        final Crawler crawler;
        try {
            crawler = new Crawler();
            crawler.crawl();
        } catch (final IOException ex) {
            LOG.error("Error during the initialisation of the crawler", ex);
        }
    }
}

@@ -212,16 +212,93 @@
 s.%0A */%0A%0A
+import feedmeyoutubecore.Version;%0Aimport feedmeyoutubecore.obj.YouTubeVideo;%0A
 import f
@@ -325,16 +325,21 @@
 crawler.
+Video
 Crawler;
@@ -364,43 +364,36 @@
 ubec
-ore.Version;%0Aimport java.io.IOExcep
+rawler.crawler.YouTubeConnec
 tion
@@ -452,16 +452,68 @@
 ctory;%0A%0A
+import java.io.IOException;%0Aimport java.util.List;%0A%0A
 /**%0A * M
@@ -809,16 +809,35 @@
 RSION);%0A
+%0A        try %7B%0A    
         
@@ -846,16 +846,21 @@
 nal 
+Video
 Crawler 
 craw
@@ -859,28 +859,85 @@
 ler 
-crawler;%0A        try
+vc = new VideoCrawler(new YouTubeConnection());%0A            if (vc.hasNext())
  %7B%0A 
@@ -951,31 +951,124 @@
     
+  
-crawler = new Crawler
+  List%3CYouTubeVideo%3E videos = vc.getNextVideos();%0A                LOG.info(%22Size of video list %7B%7D%22, videos.size
 ()
+)
 ;%0A  
@@ -1081,24 +1081,101 @@
     
+    
-crawler.crawl();
+videos.stream().forEach(video -%3E LOG.info(%22Video info %7B%7D%22, video.VideoId));%0A            %7D
 %0A   
@@ -1207,17 +1207,16 @@
 eption e
-x
 ) %7B%0A    
@@ -1238,59 +1238,36 @@
 or(%22
-Error during the initialisation of the crawler
+Can't connect to youtube
 %22, e
-x
 );%0A 

Remove usage of Crawler class