bump to v0.4.2

This commit is contained in:
kulikov0 committed 2026-09-16 17:04:14 +02:00
1 parent 1cf840756a
commit 799146771a
14 files changed
+17 -20

No files matched your search

+1 -4
View File
@@ -6,8 +6,6 @@ import (
"fmt"
"math/rand/v2"
"strings"
"github.com/kulikov0/headless-client"
)
type DeviceProfile struct {
@@ -185,8 +183,7 @@ func chromeVersionFromUserAgent(userAgent string) string {
return version
}
func ChromeWindowsDeviceProfile() DeviceProfile {
userAgent := headless.ChromeWindows.UserAgent()
func ChromeWindowsDeviceProfile(userAgent string) DeviceProfile {
screen := commonScreens[rand.IntN(len(commonScreens))]
return DeviceProfile{
UserAgent: userAgent,
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"os"
)
const Version = "0.4.1"
const Version = "0.4.2"
func MaybePrintVersion() {
for _, arg := range os.Args[1:] {
+1 -1
View File
@@ -182,7 +182,7 @@ func NewSession(httpClient *http.Client) (*Session, error) {
}
httpClient.Jar = jar
}
return &Session{HTTPClient: httpClient, Device: common.ChromeWindowsDeviceProfile()}, nil
return &Session{HTTPClient: httpClient, Device: common.ChromeWindowsDeviceProfile(headless.ChromeWindows.UserAgent())}, nil
}
func (s *Session) RegisterGuest() (*GuestAuthResponse, error) {