package com.newvideo.controller.api; import java.io.PrintWriter; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.newvideo.iqiyi.util.IqiyiUtil; import com.newvideo.sohu.SoHuUtil; import com.newvideo.youku.YouKuUtil; @Controller @RequestMapping("/videoparser") public class VideoParserController { @Resource private IqiyiUtil iqiyiUtil; @Resource private SoHuUtil soHuUtil; @Resource private YouKuUtil youKuUtil; @RequestMapping(value = "/iqiyi", method = RequestMethod.GET) public void iqiyi(HttpServletRequest request, PrintWriter out) { iqiyiUtil.updateAll(""); } @RequestMapping(value = "/soHu", method = RequestMethod.GET) public void soHu(HttpServletRequest request, PrintWriter out) { soHuUtil.parseAll(); } @RequestMapping(value = "/youKu", method = RequestMethod.GET) public void youKu(HttpServletRequest request, PrintWriter out) { youKuUtil.startParseShow(); } @RequestMapping(value = "/updateHomeVideoPic", method = RequestMethod.GET) public void updateHomeVideoPic(HttpServletRequest request, PrintWriter out) { } // 更新youku单个视频 @RequestMapping(value = "/youKuSingleUpdate", method = RequestMethod.GET) public void youKuSingleUpdate(HttpServletRequest request, PrintWriter out) { youKuUtil.updateProgramById("d21d807e749611e1b356"); } }