Browse Source

add quit on points

master
Roshless 3 months ago
parent
commit
7bc8d9e4ae
2 changed files with 10 additions and 4 deletions
  1. 1
    1
      main.go
  2. 9
    3
      variables.go

+ 1
- 1
main.go View File

@@ -56,7 +56,7 @@ func enterGiveaways(cookie *http.Cookie, enterWishlist bool) {
if err != nil {
log.Fatalln(err)
}
if pointsInt <= 0 {
if pointsInt <= quitPoints {
fmt.Println("No points left, exiting")
return
}

+ 9
- 3
variables.go View File

@@ -19,9 +19,15 @@ var (
pointsRegex = regexp.MustCompile(`<span class=\"nav__points\">(?P<Points>[0-9]{1,3})</span>`)
pointsResponseRegex = regexp.MustCompile(`\"points\":\"(?P<Points>[0-9]+)\"`)

cookieName = "PHPSESSID"
)

// User wariables
var (
cookieFileName = ".steamgifts_cookie"
cookieName = "PHPSESSID"

timeToSleepFor = time.Hour * 5
timeToRunFor = time.Hour * 168
timeToSleepFor = time.Hour * 5 // how long to wait for each loop
timeToRunFor = time.Hour * 168 // run for a week

quitPoints = int64(10) // setting to lower than 5 considerably extends loop time
)

Loading…
Cancel
Save