function parseVideoIOSUrls($sql)
{
    global $db;
    writetofile("parseVideo.txt", $sql);
    $rs = $db->query($sql);
    $rscount = $db->num_rows($rs);
    if ($rscount == 0) {
        errmsg("没有可用的数据");
    } else {
        while ($row = $db->fetch_array($rs)) {
            $u_id = $row["u_id"];
            $u_weburl = $row["u_weburl"];
            $p_id = $row["p_id"];
            $m_urltest = $row["m_urltest"];
            if (isN($u_weburl)) {
                $u_weburl = $m_urltest;
            }
            $project = getProgject($p_id);
            $webCode = getPage($u_weburl, $project->p_coding);
            //	    		$videoUrl = crawleVideoByPlayUrl($webCode,$project);
            $videoUrl = ContentProviderFactory::getContentProvider($project->p_playtype)->parseIOSVideoUrlByContent($webCode, $project->p_coding, $project->p_script);
            writetofile("android_log.txt", $strlink . '{===}' . $androidUrl);
            if (!isN($videoUrl)) {
                $sql = "update {pre}cj_vod_url set iso_video_url='" . $videoUrl . "', u_weburl='" . $u_weburl . "',android_vedio_url ='" . $androidUrl . "' where u_id=" . $u_id;
                writetofile("parseVideo.txt", $sql);
                $db->query($sql);
            } else {
                writetofile("videoUrlErrors.txt", '{===}' . $p_id . '{===}' . $u_id . '{===}' . $u_weburl);
            }
        }
    }
    unset($rs);
}
function parseVideoAndroidUrls($sql)
{
    global $db;
    writetofile("parseVideoAndroid.txt", $sql);
    //    	var_dump($sql);
    $rs = $db->query($sql);
    $rscount = $db->num_rows($rs);
    if ($rscount == 0) {
        errmsg("没有可用的数据");
    } else {
        while ($row = $db->fetch_array($rs)) {
            $u_id = $row["u_id"];
            $u_weburl = $row["u_weburl"];
            $p_id = $row["p_id"];
            $m_urltest = $row["m_urltest"];
            if (isN($u_weburl)) {
                $u_weburl = $m_urltest;
            }
            $project = getProgject($p_id);
            $videoUrl = crawleAndroidVideoByPlayUrl($u_weburl, $project);
            if (!isN($videoUrl)) {
                $sql = "update {pre}cj_vod_url set android_vedio_url='" . $videoUrl . "', u_weburl='" . $u_weburl . "' where u_id=" . $u_id;
                writetofile("parseVideoAndroid.txt", $sql);
                $db->query($sql);
            } else {
                writetofile("videoUrlAndroidErrors.txt", '{===}' . $p_id . '{===}' . $u_id . '{===}' . $u_weburl);
            }
        }
    }
    unset($rs);
}
function getVideoUrlByProjectAndUrl($url, $pid)
{
    //    	global $db;
    $project = getProgject($pid);
    $webCode = getPage($url, $project->p_coding);
    $videoUrl = ContentProviderFactory::getContentProvider($project->p_playtype)->parseIOSVideoUrlByContent($webCode, $project->p_coding, $project->p_script);
    $androidUrl = ContentProviderFactory::getContentProvider($project->p_playtype)->parseAndroidVideoUrlByContent($webCode, $project->p_coding, $project->p_script);
    if (!isN($videoUrl) || !isN($androidUrl)) {
        return $videoUrl . MovieType::VIDEO_SEP_VERSION . $androidUrl;
    } else {
        return "Can't find";
    }
}