| | |
| | | throw new Exception("area不能为空"); |
| | | } |
| | | |
| | | for (int i = 19; i >= 0; i--) { |
| | | try { |
| | | List<TencentWebUtil.TencentWebVideoInfo> list = TencentWebUtil.getVideoList(TencentWebUtil.parseParams(urlParams.getUrl()), i + 1); |
| | | if (list.size() == 0) |
| | | continue; |
| | | Collections.reverse(list); |
| | | for (TencentWebUtil.TencentWebVideoInfo videoInfo : list) { |
| | | solrShortVideoDataManager.saveOrUpdate(SolrShortVideoFactory.create(videoInfo, urlParams.getArea(), urlParams.getVideoType())); |
| | | } |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | } |
| | | // for (int i = 19; i >= 0; i--) { |
| | | // try { |
| | | // List<TencentWebUtil.TencentWebVideoInfo> list = TencentWebUtil.getVideoList(TencentWebUtil.parseParams(urlParams.getUrl()), i + 1); |
| | | // if (list.size() == 0) |
| | | // continue; |
| | | // Collections.reverse(list); |
| | | // for (TencentWebUtil.TencentWebVideoInfo videoInfo : list) { |
| | | // solrShortVideoDataManager.saveOrUpdate(SolrShortVideoFactory.create(videoInfo, urlParams.getArea(), urlParams.getVideoType())); |
| | | // } |
| | | // } catch (Exception e) { |
| | | // |
| | | // } |
| | | // } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | } |