mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2025-12-10 21:59:38 +05:00
table
This commit is contained in:
@@ -157,10 +157,9 @@ func GetClientID() (string, error) {
|
||||
if ver == "" && bytes.HasPrefix(l, sc_version) {
|
||||
ver = cfg.B2s(l[len(sc_version) : len(l)-len(`"</script>`)])
|
||||
misc.Log("found ver:", ver)
|
||||
// if scriptUrl != nil {
|
||||
// misc.Log("we early (1)")
|
||||
// break
|
||||
// }
|
||||
if ClientIDCache.Version != "" && ver == ClientIDCache.Version {
|
||||
goto verCacheHit
|
||||
}
|
||||
} else if bytes.HasPrefix(l, script0) {
|
||||
scriptUrl = l[len(`<script crossorigin src="`) : len(l)-len(`"></script>`)]
|
||||
misc.Log("found scriptUrl:", string(scriptUrl))
|
||||
@@ -168,10 +167,6 @@ func GetClientID() (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if ver == ClientIDCache.Version {
|
||||
goto verCacheHit
|
||||
}
|
||||
|
||||
if ver == "" {
|
||||
return "", ErrVersionNotFound
|
||||
}
|
||||
@@ -212,15 +207,14 @@ func GetClientID() (string, error) {
|
||||
for l := range bytes.SplitSeq(data, newline) {
|
||||
if ver == "" && bytes.HasPrefix(l, sc_version) {
|
||||
ver = cfg.B2s(l[len(sc_version) : len(l)-len(`"</script>`)])
|
||||
if ver == ClientIDCache.Version {
|
||||
goto verCacheHit
|
||||
}
|
||||
} else if bytes.HasPrefix(l, script) {
|
||||
scriptUrls = append(scriptUrls, l[len(`<script crossorigin src="`):len(l)-len(`"></script>`)])
|
||||
}
|
||||
}
|
||||
|
||||
if ver == ClientIDCache.Version {
|
||||
goto verCacheHit
|
||||
}
|
||||
|
||||
if ver == "" {
|
||||
return "", ErrVersionNotFound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user