package com.zzsn.test;

import com.zzsn.utils.ContentFileFinder;
import com.zzsn.utils.FileTag;
import org.jsoup.Jsoup;
import org.jsoup.safety.Whitelist;
import org.springframework.core.io.ClassPathResource;
import org.springframework.jdbc.datasource.DataSourceUtils;

import java.io.*;
import java.sql.Blob;
import java.util.Map;
import java.util.Set;

public class Test2 {
    public static void main (String[] args) throws IOException {
        String s =content();
        Map<String, FileTag> contentFileTag = ContentFileFinder.getContentFileTag(s, "http://www.csicl.com.cn/n332/n334/c24531/content.html");
        for (Map.Entry<String, FileTag> mapentry :
                contentFileTag.entrySet()) {
            System.out.println(mapentry.getKey()+":"+mapentry.getValue().getAbsolutePath());
        }

    }
    public static String content(){
        String content="<div class=\"article_text\" id=\"zoom\">\n" +
                "            <p style=\"TEXT-ALIGN: center\">\n" +
                " <video controls=\"controls\" loop=\"loop\" width=\"640\" height=\"338\" src=\"../../../n332/n336/c23793/part/28631.mp4\">\n" +
                "  <object classid=\"clsid:6bf52a52-394a-11d3-b153-00c04f79faa6\" width=\"640\" height=\"338\"> <param name=\"url\" value=\"../../../n332/n336/c23793/part/28631.mp4\"> <param name=\"autostart\" value=\"false\"> <param name=\"uimode\" value=\"full\"><embed type=\"application/x-mplayer2\" src=\"../../../n332/n336/c23793/part/28631.mp4\" width=\"640\" height=\"338\" autostart=\"false\" uimode=\"full\" pluginspage=\"http://microsoft.com/windows/mediaplayer/en/download/\"></object>\n" +
                " </video></p> \n" +
                "<p>　　7月17日，央视《新闻联播》对我国造船国际市场份额继续位居世界第一进行了报道。数据显示，一至六月份，我国造船完工量、新接订单量、手持订单量，以载重吨计分别占世界总量的45.2%、50.8%和47.8%，国际市场份额继续位居世界第一。 <br> <br> 来源：央视《新闻联播》</p>\n" +
                "       </div>";
        return content;
    }
}
