Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "log"
- "time"
- "github.com/tebeka/selenium"
- "github.com/tebeka/selenium/chrome"
- )
- func main() {
- service, err := selenium.NewChromeDriverService("./chromedriver", 4444)
- if err != nil {
- log.Fatal("Error:", err)
- }
- defer service.Stop()
- caps := selenium.Capabilities{}
- caps.AddChrome(chrome.Capabilities{Args: []string{
- // "--headless", // comment out this line for testing
- }})
- driver, err := selenium.NewRemote(caps, "")
- err = driver.Get("https://csgorun.bet")
- el, _ := driver.FindElement(selenium.ByXPATH, "/html/body/div[1]/div[2]/div/div[1]/header/button")
- err = el.Click()
- if err != nil {
- log.Fatal(err)
- }
- el_steam, _ := driver.FindElement(selenium.ByXPATH, "/html/body/div[3]/div/div[2]/div/button[1]")
- el_steam.Click()
- cookie_browserid := &selenium.Cookie{
- Name: "browserid",
- Value: "3322051912952820891",
- Path: "/",
- Domain: "steamcommunity.com",
- Secure: true,
- }
- driver.AddCookie(cookie_browserid)
- cookie_sessionid := &selenium.Cookie{
- Name: "sessionid",
- Value: "9da85af759091ebcfa385cd9",
- Path: "/",
- Domain: "steamcommunity.com",
- Secure: true,
- }
- driver.AddCookie(cookie_sessionid)
- cookie_secureid := &selenium.Cookie{
- Name: "sessionidSecureOpenIDNonce",
- Value: "d85b6cf6f0a59f665abdecfc",
- Path: "/",
- Domain: "steamcommunity.com",
- Secure: true,
- }
- driver.AddCookie(cookie_secureid)
- cookie_steamCountry := &selenium.Cookie{
- Name: "steamCountry",
- Value: "RU%7Cd32000312352e1c4d2cfc30dd94113d0",
- Path: "/",
- Domain: "steamcommunity.com",
- Secure: true,
- }
- cookie_steamLoginSecure := &selenium.Cookie{
- Name: "steamLoginSecure",
- Value: "76561199299175343%7C%7CeyAidHlwIjogIkpXVCIsICJhbGciOiAiRWREU0EiIH0.eyAiaXNzIjogInI6MEY5MV8yNEM5RDIzRV9BMzc0QiIsICJzdWIiOiAiNzY1NjExOTkyOTkxNzUzNDMiLCAiYXVkIjogWyAid2ViOmNvbW11bml0eSIgXSwgImV4cCI6IDE3MjIwOTMyODgsICJuYmYiOiAxNzEzMzY2MTQzLCAiaWF0IjogMTcyMjAwNjE0MywgImp0aSI6ICIwRjg0XzI0QzlEMjQwXzdFNUVFIiwgIm9hdCI6IDE3MjIwMDYxNDMsICJydF9leHAiOiAxNzQwMjM1NzQ5LCAicGVyIjogMCwgImlwX3N1YmplY3QiOiAiOTUuMjIxLjE3MC4xMDQiLCAiaXBfY29uZmlybWVyIjogIjk1LjIyMS4xNzAuMTA0IiB9.C77oCmH8hNLGIiz3jbppjCDpkxg49wRtzKPs5o_u21dsijhhkCKN-BBhG7pHHDHT_e2jSmlvqd_OGVDb-Rv7DA",
- Path: "/",
- Domain: "steamcommunity.com",
- Secure: true,
- }
- cookie_timezoneOffset := &selenium.Cookie{
- Name: "timezoneOffset",
- Value: "10800,0",
- Domain: "steamcommunity.com",
- Secure: false,
- }
- // err = driver.Get("https://csgorun.bet/crash")
- time.Sleep(6000 * time.Second)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement