func parseInfo(input *goquery.Selection) (avalible int64, maxFiles int, maxFile int64) {
	var err error
	avalibleStr, found := input.Attr("data-free-bytes")
	if found {
		avalible, err = strconv.ParseInt(avalibleStr, 10, 64)
	}
	if err != nil || !found {
		avalible = -1
		fmt.Println("[WARN] Failed to get space limit, upload might fail")
	}
	maxFileStr, found := input.Attr("data-max-bytes")
	if found {
		maxFile, err = strconv.ParseInt(maxFileStr, 10, 64)
	}
	if err != nil || !found {
		maxFile = -1
		fmt.Println("[WARN] Failed to get file size limit, upload might fail")
	}
	maxFiles = -1
	info := input.NextFiltered("div.caption2").Text()
	reMaxFiles := regexp.MustCompile(`up\s+to\s+(\d+)`)
	maxFilesStrs := reMaxFiles.FindStringSubmatch(info)
	if len(maxFilesStrs) == 2 {
		maxFiles, err = strconv.Atoi(maxFilesStrs[1])
		if err != nil {
			maxFiles = -1
		}
	}
	if maxFile == -1 {
		fmt.Println("[WARN] Failed to get total files limit, upload might fail")
	}
	return
}
extracts limitations from the /uploads page
package main
import (
	"fmt"
	"io"
	"regexp"
	"strconv"
	"github.com/PuerkitoBio/goquery"
	"github.com/pkg/errors"
)
type OvercastParams struct {
	SpaceAvailible int64
	MaxFileCount   int
	MaxFileSize    int64
	PostData       map[string]string
	UploadURL      string
	DataKeyPrefix  string
}