diff --git a/src/main/de/mrbesen/youtubecrawler/YoutubeAPI.java b/src/main/de/mrbesen/youtubecrawler/YoutubeAPI.java index 69c23cc..dd23076 100644 --- a/src/main/de/mrbesen/youtubecrawler/YoutubeAPI.java +++ b/src/main/de/mrbesen/youtubecrawler/YoutubeAPI.java @@ -38,25 +38,11 @@ public class YoutubeAPI { } } - public YoutubeAPI() { - if(api_key.isEmpty()) { - log.error("apikey is not defined!"); - System.exit(1); - } - try { - durationfactory = DatatypeFactory.newInstance(); - } catch(DatatypeConfigurationException e) { - e.printStackTrace(); - System.exit(1); - } - } - public Crawler.Video getInfo(String id) { - return (Crawler.Video) getInfos(id)[0].get(0); + return getInfos(id)[0].get(0); } public List[] getInfos(List ids) { - //log.info("get " + ids.size() + " infos"); if(ids.isEmpty()) return null; @@ -174,5 +160,4 @@ public class YoutubeAPI { return null; return new JSONObject(new JSONTokener(in)); } -} -// no suchelement bla \ No newline at end of file +} \ No newline at end of file