{"record":{"id":"c0df6a0f6676797d","repo":"AlistGo/alist","slug":"jstoken-not-found-html-s","errorCode":null,"errorMessage":"jsToken not found, html: %s","messagePattern":"jsToken not found, html: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/terabox/util.go","lineNumber":51,"sourceCode":"\treturn mid\n}\n\nfunc (d *Terabox) resetJsToken() error {\n\tu := d.base_url\n\tres, err := base.RestyClient.R().SetHeaders(map[string]string{\n\t\t\"Cookie\":           d.Cookie,\n\t\t\"Accept\":           \"application/json, text/plain, */*\",\n\t\t\"Referer\":          d.base_url,\n\t\t\"User-Agent\":       base.UserAgent,\n\t\t\"X-Requested-With\": \"XMLHttpRequest\",\n\t}).Get(u)\n\tif err != nil {\n\t\treturn err\n\t}\n\thtml := res.String()\n\tjsToken := getStrBetween(html, \"`function%20fn%28a%29%7Bwindow.jsToken%20%3D%20a%7D%3Bfn%28%22\", \"%22%29`\")\n\tif jsToken == \"\" {\n\t\treturn fmt.Errorf(\"jsToken not found, html: %s\", html)\n\t}\n\td.JsToken = jsToken\n\treturn nil\n}\n\nfunc (d *Terabox) request(rurl string, method string, callback base.ReqCallback, resp interface{}, noRetry ...bool) ([]byte, error) {\n\treq := base.RestyClient.R()\n\treq.SetHeaders(map[string]string{\n\t\t\"Cookie\":           d.Cookie,\n\t\t\"Accept\":           \"application/json, text/plain, */*\",\n\t\t\"Referer\":          d.base_url,\n\t\t\"User-Agent\":       base.UserAgent,\n\t\t\"X-Requested-With\": \"XMLHttpRequest\",\n\t})\n\treq.SetQueryParams(map[string]string{\n\t\t\"app_id\":     \"250528\",\n\t\t\"web\":        \"1\",\n\t\t\"channel\":    \"dubox\",","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/terabox/util.go#L33-L69","documentation":"resetJsToken scraped the Terabox homepage HTML but the expected obfuscated jsToken assignment string was not found, so no jsToken could be extracted. Usually means Terabox changed its page markup or returned an error/login page instead.","triggerScenarios":"Thrown at drivers/terabox/util.go:51 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the referenced file/path/ID exists and is correct, then retry the operation."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","contentChangedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}