diff --git a/extractors/qq_test.go b/extractors/qq_test.go index 6c72d190a..ca349f0fb 100644 --- a/extractors/qq_test.go +++ b/extractors/qq_test.go @@ -18,7 +18,7 @@ func TestQQ(t *testing.T) { args: test.Args{ URL: "https://v.qq.com/x/page/n0687peq62x.html", Title: "世界杯第一期:100秒速成!“伪球迷”世界杯生存指南", - Size: 23897406, + Size: 23759683, Quality: "蓝光;(1080P)", }, }, diff --git a/extractors/youku.go b/extractors/youku.go index 3101abdc4..f3d9e6c58 100644 --- a/extractors/youku.go +++ b/extractors/youku.go @@ -96,7 +96,7 @@ func youkuUps(vid string) youkuData { // grep -oE '"[0-9a-zA-Z+/=]{256}"' youku-player.min.js ckey := "7B19C0AB12633B22E7FE81271162026020570708D6CC189E4924503C49D243A0DE6CD84A766832C2C99898FC5ED31F3709BB3CDD82C96492E721BDD381735026" for _, ccode := range []string{config.Ccode} { - if ccode == "010101500003" { + if ccode == "0103010102" { utid = generateUtdid() } url = fmt.Sprintf( @@ -137,7 +137,7 @@ func hmacSha1(key []byte, msg []byte) []byte { func generateUtdid() string { timestamp := int32(time.Now().Unix()) var buffer bytes.Buffer - buffer.Write(getBytes(timestamp)) + buffer.Write(getBytes(timestamp - 60*60*8)) buffer.Write(getBytes(rand.Int31())) buffer.WriteByte(0x03) buffer.WriteByte(0x00) diff --git a/extractors/youku_test.go b/extractors/youku_test.go index a262f2bc5..9cfc42287 100644 --- a/extractors/youku_test.go +++ b/extractors/youku_test.go @@ -9,7 +9,7 @@ import ( func TestYouku(t *testing.T) { config.InfoOnly = true - config.Ccode = "010101500003" + config.Ccode = "0103010102" tests := []struct { name string args test.Args @@ -19,8 +19,8 @@ func TestYouku(t *testing.T) { args: test.Args{ URL: "http://v.youku.com/v_show/id_XMzUzMjE3NDczNg==.html", Title: "车事儿:智能汽车已经不在遥远 东风风光iX5发布", - Size: 22692900, - Quality: "mp4hd2 1280x720", + Size: 45185427, + Quality: "mp4hd3 1920x1080", }, }, { @@ -28,8 +28,8 @@ func TestYouku(t *testing.T) { args: test.Args{ URL: "http://v.youku.com/v_show/id_XMzQ1MTAzNjQwNA==.html", Title: "这!就是街舞 第一季 第3期:百强“互杀”队长不忍直视", - Size: 750911635, - Quality: "mp4hd2 1280x720 国语", + Size: 1419459808, + Quality: "mp4hd3 1920x1080 国语", }, }, } diff --git a/main.go b/main.go index 45f462975..8cd6a5abb 100644 --- a/main.go +++ b/main.go @@ -37,7 +37,7 @@ func init() { "Playlist video items to download. Separated by commas like: 1,5,6", ) flag.BoolVar(&config.Caption, "C", false, "Download captions") - flag.StringVar(&config.Ccode, "ccode", "010101500003", "Youku ccode") + flag.StringVar(&config.Ccode, "ccode", "0103010102", "Youku ccode") flag.IntVar( &config.RetryTimes, "retry", 100, "How many times to retry when the download failed", )