class StockToVIPFollowerCountEntryMapper extends AbstractMapper <Stock, Entry<Stock, Integer>> {

    private static final String REQUEST_PREFIX = URLMapper.MAIN_PAGE + "/S/";
    private static final String REQUEST_SUFFIX = "/follows?page=";


    private int VIPFriendsCountShreshold;
    private int latestK_NewFollowers;

    public StockToVIPFollowerCountEntryMapper() {
        this(10000, 5);
    }

    public StockToVIPFollowerCountEntryMapper(int VIPFriendsCountShreshold, int latestK_NewFollowers) {
        this(null, VIPFriendsCountShreshold, latestK_NewFollowers);
    }


    /**
     *
     * @param strategy 超时等待策略（null则设置为默认等待策略）
     * @param VIPFriendsCountShreshold 是否为大V的粉丝阈值（超过这个阈值视为大V）
     * @param latestK_NewFollowers 只将最近K个新增用户纳入计算范围
     */
    public StockToVIPFollowerCountEntryMapper(TimeWaitingStrategy strategy,
                                              int VIPFriendsCountShreshold,
                                              int latestK_NewFollowers) {
        super(strategy);
        if(VIPFriendsCountShreshold < 0 || latestK_NewFollowers < 0) throw new IllegalArgumentException();
        this.VIPFriendsCountShreshold = VIPFriendsCountShreshold;
        this.latestK_NewFollowers = latestK_NewFollowers;
    }

    @Override
    public Entry<Stock, Integer> mapLogic(Stock stock) throws Exception {

        if(stock == null || stock == EmptyObject.emptyStock)
            return new Entry<>(EmptyObject.emptyStock, 0);

        String stockNo = stock.getStockNo();

        int count = 0;

        for (int i = 1; i < latestK_NewFollowers; i++) {

            String reqUrl = REQUEST_PREFIX + stockNo + REQUEST_SUFFIX + i;
            URL url = new URL(reqUrl);

            String content;
            while (true) {
                try {

                    content = request(url);
                    break;

                } catch (Exception e) {
                    System.out.println("Mapper: Network busy Retrying");
                }
            }

            JsonNode node = parseHtmlToJsonNode(content).get("followers");

            if(node.size() == 0) break;

            for (JsonNode jsonNode : node) {
                int followersCount = jsonNode.get("followers_count").asInt();
                if(followersCount > VIPFriendsCountShreshold) count++;
            }

        }

        return new Entry<>(stock, count);
    }


    private JsonNode parseHtmlToJsonNode(String content) throws IOException {<FILL_FUNCTION_BODY>}
}


        Document doc = Jsoup.parse(content);
        String indexer1 = "follows=";
        String indexer2 = ";seajs.use";
        StringBuilder builder = new StringBuilder(
                doc.getElementsByTag("script")
                .get(15)
                .dataNodes()
                .get(0)
                .attr("data"));
        int index = builder.indexOf(indexer1);
        builder.delete(0, index + indexer1.length());
        index = builder.indexOf(indexer2);
        builder.delete(index, builder.length());
        return mapper.readTree(builder.toString());

    
<methods>public void <init>(org.decaywood.timeWaitingStrategy.TimeWaitingStrategy) ,public void <init>(org.decaywood.timeWaitingStrategy.TimeWaitingStrategy, java.lang.String) ,public Entry<org.decaywood.entity.Stock,java.lang.Integer> apply(org.decaywood.entity.Stock) <variables>