iawia002/lux · error
data.Msg
Error message
data.Msg
What it means
The QQ Video extractor calls the internal vinfo API (getVinfo with the 'shd' definition) and checks the Msg field of the response. A non-empty Msg means the API accepted the HTTP request but rejected the video request server-side, and lux surfaces that message verbatim as the error (e.g. 'wrong vid' or region notices).
Source
Thrown at extractors/qq/qq.go:214
}
vids = utils.MatchOneOf(
u, `vid=(\w+)`, `vid:\s*["'](\w+)`, `vid\s*=\s*["']\s*(\w+)`,
)
if vids == nil || len(vids) < 2 {
return nil, errors.WithStack(extractors.ErrURLParseFailed)
}
vid = vids[1]
}
data, err := getVinfo(vid, "shd", url)
if err != nil {
return nil, errors.WithStack(err)
}
// API request error
if data.Msg != "" {
return nil, errors.New(data.Msg)
}
cdn := data.Vl.Vi[0].Ul.UI[0].URL
streams, err := genStreams(vid, cdn, data)
if err != nil {
return nil, errors.WithStack(err)
}
return []*extractors.Data{
{
Site: "腾讯视频 v.qq.com",
Title: data.Vl.Vi[0].Ti,
Type: extractors.DataTypeVideo,
Streams: streams,
URL: url,
},
}, nil
}
View on GitHub (pinned to dd00f6d258)
Solutions
- Open the same v.qq.com URL in a browser from the same network; if it refuses to play there, the API rejection is expected
- If region-blocked, retry from a mainland-China network or pick a non-restricted video
- Try a different definition in getVinfo (e.g. 'sd' or 'hd' instead of 'shd') — some vids only have lower definitions registered
- Surface data.Msg to the end user and skip the URL in batch runs
Example fix
// before
_, err := qq.Extract(url, opts)
if err != nil { return err }
// after
_, err := qq.Extract(url, opts)
if err != nil {
if strings.Contains(err.Error(), "vid") || strings.Contains(err.Error(), "地区") {
log.Printf("qq video unavailable for this vid/region: %v", err)
continue
}
return err
} Defensive patterns
Strategy: try-catch
Try / catch
_, err := qq.Extract(url, opts)
if err != nil {
// err.Error() carries the vinfo API Msg verbatim; branch on it
if strings.Contains(err.Error(), "vid") || strings.Contains(err.Error(), "不存在") {
// dead or geo-restricted video: skip
}
return err
} Prevention
- Expect QQ Video API refusals outside mainland China; pick test URLs accordingly
- Treat any non-empty Msg as terminal for that vid — retrying the same vid rarely helps
- Log data.Msg text; it names the actual server-side reason
When it happens
Trigger: Calling Extract on a v.qq.com URL whose vid the vinfo API does not recognize (deleted drama/movie/episode), or from an IP region the API refuses (much QQ Video content is mainland-China only). The vid regex matched, so failure happens at the getVinfo(vid, "shd", url) call.
Common situations: Running the downloader outside mainland China against geo-locked content; URLs to episodes that were taken down; trailer/preview ids that the shd definition does not serve.
Related errors
AI-assisted analysis of iawia002/lux@dd00f6d258 (2026-08-15).
Data as JSON: /api/errors/dd642dd0cff12f8e.
Report an issue: GitHub.