admin
2020-09-12 2778cf2a16823f9b1153a0549b47f7b503176a17
src/test/java/com/hxh/spring/test/VideoTest.java
@@ -4,6 +4,7 @@
import com.yeshi.buwan.domain.DetailSystem;
import com.yeshi.buwan.domain.VideoInfo;
import com.yeshi.buwan.domain.entity.PlayUrl;
import com.yeshi.buwan.iqiyi.IqiYiNewAPI;
import com.yeshi.buwan.iqiyi.entity.IqiyiUpdateQueue;
import com.yeshi.buwan.iqiyi.util.IqiyiUtil;
import com.yeshi.buwan.pptv.PPTVUtil;
@@ -15,11 +16,13 @@
import com.yeshi.buwan.util.video.VideoDetailUtil;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.junit.Test;
import org.springframework.orm.hibernate4.HibernateCallback;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
public class VideoTest {
@@ -123,7 +126,7 @@
         int count = 0;
         while (StringUtil.isNullOrEmpty(aid) && count < 3) {
            if (StringUtil.isNullOrEmpty(queue.getAid())) {
               aid = IqiyiUtil.getAlbumIdFromPlayUrl(queue.getUrl());
                    aid = IqiYiNewAPI.getAidByUrl(queue.getUrl());
               count++;
               try {
                  Thread.sleep(1000 * 2);
@@ -142,4 +145,11 @@
   }
    @Test
    public void test111() {
        String regx = "^[(\\u4e00-\\u9fa5)()a-zA-Z0-9]+$";
        boolean isMatch = Pattern.matches(regx, "今天 hello");
        System.out.println(isMatch);
    }
}