package mobvista.dmp.datasource.apptag.crawler;

import mobvista.dmp.util.HttpUtil;

import java.io.IOException;

/**
 * author: houying
 * date  : 16-11-3
 * desc  :
 */
public class AdrDetailVisitor implements AppInfoCrawler.DetailVisitor {
    private final String url = "https://play.google.com/store/apps/details?id=";
    private final ProxyManager proxyManager;

    public AdrDetailVisitor(ProxyManager proxyManager) {
        this.proxyManager = proxyManager;
    }

    @Override
    public HttpUtil.HttpResult visit(String packageName) throws IOException {
        return HttpUtil.doGet(url + packageName, proxyManager.getProxy());
    }
}
