func SearchForUsers(username string) ([]Account, error) {
	url := fmt.Sprintf(searchURL, username)
	data, err := getDataFromURL(url)
	if err != nil {
		return nil, err
	}
	accounts, err := getFromSearchPage(data)
	if err != nil {
		return nil, err
	}
	return accounts, nil
}
SearchForUsers try to find users by given username.
Return slice of Account with length of 0 or more.
package instagram
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"strings"
	"errors"
)
func GetAccountByUsername(username string) (Account, error) {
	url := fmt.Sprintf(accountInfoURL, username)
	data, err := getDataFromURL(url)
	if err != nil {
		return Account{}, err
	}
	account, err := getFromAccountPage(data)
	if err != nil {
		return account, err
	}
	return account, nil
}
func GetMediaByURL(url string) (Media, error) {
	code := strings.Split(url, "/")[4]
	return GetMediaByCode(code)
}
func GetMediaByCode(code string) (Media, error) {
	url := fmt.Sprintf(mediaInfoURL, code)
	data, err := getDataFromURL(url)
	if err != nil {
		return Media{}, err
	}
	media, err := getFromMediaPage(data)
	if err != nil {
		return Media{}, err
	}
	return media, nil
}
func GetAccountMedia(username string, limit uint16) ([]Media, error) {
	var count uint16
	maxID := ""
	available := true
	medias := []Media{}
	for available && count < limit {
		url := fmt.Sprintf(accountMediaURL, username, maxID)
		jsonBody, err := getJSONFromURL(url)
		if err != nil {
			return nil, err
		}
		available, _ = jsonBody["more_available"].(bool)
		items, _ := jsonBody["items"].([]interface{})
		for _, item := range items {
			if count >= limit {
				return medias, nil
			}
			count++
			itemData, err := json.Marshal(item)
			if err == nil {
				media, err := getFromAccountMediaList(itemData)
				if err == nil {
					medias = append(medias, media)
					maxID = media.ID
				}
			}
		}
	}
	return medias, nil
}
func GetAllAccountMedia(username string) ([]Media, error) {
	account, err := GetAccountByUsername(username)
	if err != nil {
		return nil, err
	}
	count := uint16(account.MediaCount)
	medias, err := GetAccountMedia(username, count)
	if err != nil {
		return nil, err
	}
	return medias, nil
}
func GetLocationMedia(id string, limit uint16) ([]Media, error) {
	var count uint16
	maxID := ""
	hasNext := true
	medias := []Media{}
	for hasNext && count < limit {
		url := fmt.Sprintf(locationURL, id, maxID)
		jsonBody, err := getJSONFromURL(url)
		if err != nil {
			return nil, err
		}
		jsonBody, _ = jsonBody["location"].(map[string]interface{})
		jsonBody, _ = jsonBody["media"].(map[string]interface{})
		nodes, _ := jsonBody["nodes"].([]interface{})
		for _, node := range nodes {
			if count >= limit {
				return medias, nil
			}
			count++
			nodeData, err := json.Marshal(node)
			if err == nil {
				media, err := getFromSearchMediaList(nodeData)
				if err == nil {
					medias = append(medias, media)
				}
			}
		}
		jsonBody, _ = jsonBody["page_info"].(map[string]interface{})
		hasNext, _ = jsonBody["has_next_page"].(bool)
		maxID, _ = jsonBody["end_cursor"].(string)
	}
	return medias, nil
}
func GetLocationTopMedia(id string) ([9]Media, error) {
	url := fmt.Sprintf(locationURL, id, "")
	jsonBody, err := getJSONFromURL(url)
	if err != nil {
		return [9]Media{}, err
	}
	jsonBody, _ = jsonBody["location"].(map[string]interface{})
	jsonBody, _ = jsonBody["top_posts"].(map[string]interface{})
	medias := [9]Media{}
	nodes, _ := jsonBody["nodes"].([]interface{})
	for i, node := range nodes {
		nodeData, err := json.Marshal(node)
		if err == nil {
			media, err := getFromSearchMediaList(nodeData)
			if err == nil {
				medias[i] = media
			}
		}
	}
	return medias, nil
}
func GetLocationByID(id string) (Location, error) {
	url := fmt.Sprintf(locationURL, id, "")
	data, err := getDataFromURL(url)
	if err != nil {
		return Location{}, err
	}
	location, err := getFromLocationPage(data)
	if err != nil {
		return Location{}, err
	}
	return location, nil
}
func GetTagMedia(tag string, quantity uint16) ([]Media, error) {
	var count uint16
	maxID := ""
	hasNext := true
	medias := []Media{}
	for hasNext && count < quantity {
		url := fmt.Sprintf(tagURL, tag, maxID)
		jsonBody, err := getJSONFromURL(url)
		if err != nil {
			return nil, err
		}
		jsonBody, _ = jsonBody["tag"].(map[string]interface{})
		jsonBody, _ = jsonBody["media"].(map[string]interface{})
		nodes, _ := jsonBody["nodes"].([]interface{})
		for _, node := range nodes {
			if count >= quantity {
				return medias, nil
			}
			count++
			nodeData, err := json.Marshal(node)
			if err == nil {
				media, err := getFromSearchMediaList(nodeData)
				if err == nil {
					medias = append(medias, media)
				}
			}
		}
		jsonBody, _ = jsonBody["page_info"].(map[string]interface{})
		hasNext, _ = jsonBody["has_next_page"].(bool)
		maxID, _ = jsonBody["end_cursor"].(string)
	}
	return medias, nil
}
func GetTagTopMedia(tag string) ([9]Media, error) {
	url := fmt.Sprintf(tagURL, tag, "")
	jsonBody, err := getJSONFromURL(url)
	if err != nil {
		return [9]Media{}, err
	}
	jsonBody, _ = jsonBody["tag"].(map[string]interface{})
	jsonBody, _ = jsonBody["top_posts"].(map[string]interface{})
	medias := [9]Media{}
	nodes, _ := jsonBody["nodes"].([]interface{})
	for i, node := range nodes {
		nodeData, err := json.Marshal(node)
		if err == nil {
			media, err := getFromSearchMediaList(nodeData)
			if err == nil {
				medias[i] = media
			}
		}
	}
	return medias, nil
}