{"record":{"id":"6b6ad35fd3659f68","repo":"iawia002/lux","slug":"data-videoinfo-corevideoinfo-errormsg","errorCode":null,"errorMessage":"data.VideoInfo.CoreVideoInfo.ErrorMsg","messagePattern":"data\\.VideoInfo\\.CoreVideoInfo\\.ErrorMsg","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"extractors/yinyuetai/yinyuetai.go","lineNumber":64,"sourceCode":"\tparams := fmt.Sprintf(\"videoId=%s\", vid[1])\n\t// generate api url\n\tapiURL := genAPI(actionGetMvInfo, params)\n\tvar err error\n\thtml, err := request.Get(apiURL, url, nil)\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\t// parse yinyuetai data\n\tdata := yinyuetaiMvData{}\n\tif err = json.Unmarshal([]byte(html), &data); err != nil {\n\t\treturn nil, errors.WithStack(extractors.ErrURLParseFailed)\n\t}\n\t// handle api error\n\tif data.Error {\n\t\treturn nil, errors.New(data.Message)\n\t}\n\tif data.VideoInfo.CoreVideoInfo.Error {\n\t\treturn nil, errors.New(data.VideoInfo.CoreVideoInfo.ErrorMsg)\n\t}\n\ttitle := data.VideoInfo.CoreVideoInfo.VideoName\n\tstreams := make(map[string]*extractors.Stream, len(data.VideoInfo.CoreVideoInfo.VideoURLModels))\n\t// set streams\n\tfor _, model := range data.VideoInfo.CoreVideoInfo.VideoURLModels {\n\t\turlData := &extractors.Part{\n\t\t\tURL:  model.VideoURL,\n\t\t\tSize: model.FileSize,\n\t\t\tExt:  \"mp4\",\n\t\t}\n\t\tstreams[model.QualityLevel] = &extractors.Stream{\n\t\t\tParts:   []*extractors.Part{urlData},\n\t\t\tSize:    model.FileSize,\n\t\t\tQuality: model.QualityLevelName,\n\t\t}\n\t}\n\treturn []*extractors.Data{\n\t\t{","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/iawia002/lux/blob/dd00f6d258d80b6684a0b9402d7124e5c18ef42f/extractors/yinyuetai/yinyuetai.go#L46-L82","documentation":"The second-tier YinYueTai API check: the top-level response parsed fine and data.Error is false, but the nested VideoInfo.CoreVideoInfo.Error flag is true, so the API's CoreVideoInfo.ErrorMsg is returned. This means the MV record exists but playback info for it was refused (copyright takedown, region limit, or removed stream).","triggerScenarios":"The MV page still exists but its stream was taken down for copyright, or the playback-info endpoint refuses the request for the client's region/IP; also possible after YinYueTai changes its response schema so Error/ErrorMsg land in unexpected places.","commonSituations":"Copyright-taken-down MVs whose landing pages remain; mainland-only content accessed from abroad; schema drift making Error truthy on valid responses.","solutions":["Verify the MV actually plays (not just loads) in a browser from the same network","If it plays in-browser but fails here, capture the API response and compare its shape with the yinyuetaiMvData struct in extractors/yinyuetai/yinyuetai.go","Retry from an appropriate region for geo-limited MVs","Treat persistent failures as unavailable content and skip"],"exampleFix":"// before\nif data.VideoInfo.CoreVideoInfo.Error {\n    return nil, errors.New(data.VideoInfo.CoreVideoInfo.ErrorMsg)\n}\n\n// after (keep the API's message but add which video it concerns)\nif data.VideoInfo.CoreVideoInfo.Error {\n    return nil, fmt.Errorf(\"yinyuetai core video info error for vid %s: %s\", vid, data.VideoInfo.CoreVideoInfo.ErrorMsg)\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"_, err := yinyuetai.Extract(url, opts)\nif err != nil {\n    // CoreVideoInfo-level refusal: MV exists but stream refused (copyright/region)\n    // do not retry the same id; report the API's ErrorMsg verbatim\n    log.Printf(\"yinyuetai stream refused for %s: %v\", url, err)\n    return err\n}","preventionTips":["Treat CoreVideoInfo errors as content-unavailable, not transient","Confirm playback (not just page load) in a browser before retrying","Track API schema changes if Error is suddenly truthy on working videos"],"tags":["yinyuetai","api-error","copyright","geo-restriction"],"backgroundTag":null,"analyzedSha":"dd00f6d258d80b6684a0b9402d7124e5c18ef42f","analyzedAt":"2026-08-15T16:57:31.080Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}