reqBody := strings. Builder{}
for i := 0; i < len(users); i++ {
reqBody. WriteString(fmt. Sprintf("route_urls[%d]=/%s/&", i, users[i]))
}
reqBody. WriteString(fmt. Sprintf("lsd=%s", lsd))
data := []byte(reqBody. String())
req, err := http. NewRequest(
"POST",
"
https://www.instagram.com/ajax/bulk-route-definitions/",
bytes. NewBuffer(data),
)
if err != nil {
return
}
req. Header. Set("X-FB-LSD", lsd)
req. Header. Set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36")
req. Header. Set("Content-Type", "application/x-www-form-urlencoded")
req. ContentLength = int64(len(data))
client := &http. Client{
Timeout: 10 * time. Second,
Transport: &http. Transport{
Proxy: http. ProxyURL(proxy),
},
}
resp, err := client. Do(req)
if err != nil {
return
}
defer resp. Body. Close()
body, err := io. ReadAll(resp. Body)
if err != nil {
return
}
json := string(body)
for _, user := range users {
key := fmt. Sprintf("/%s/", user)
if strings. Contains(json, fmt. Sprintf("\"%s\":{\"error\":true", key)) {
results[user] = "banned"
} else if strings. Contains(json, fmt. Sprintf("\"%s\":{\"error\":false", key)) {
results[user] = "active"
} else {
notProcessed = append(notProcessed, user)
}
}
اتصال الفحص :
User banned
User active