public void getSecondLinks(ArrayList<String> theLinks) throws IOException {
    	String temp=null;
    	Document doc=null;
    	boolean flag;
    	for(String sLink : theLinks) {
    		if(sLink.endsWith(".asx")==true || sLink.endsWith(".swf")==true){
    			stationLinks2.add(sLink);
    			print("Written to file: %s", sLink);
    		}else{
    			doc = parseUrl(sLink, 0);
    			if (doc!=null){
    				Elements media = doc.select("[src]");
    				print("Fetching %s -->  ", sLink);

    				flag=false;
    				for (Element src : media){
    					if (src.tagName().equals("embed")==true){
    						flag=true;
    						temp =src.attr("abs:src");
    						stationLinks2.add(temp);
    						break;//link found, load next url
    					}
    				}//end nested for
    				if (flag==false){//the code has no embed tag
    					stationLinks2.add(sLink);
    				}
    			}
    		}	
    	}//end outer for
    	writeLinksToFile(links2FileName, stationLinks2);
    	print("Written %s to file, second links.", stationLinks2.size());
    }//end method