feat: make user agent configurable

This commit is contained in:
Jef LeCompte
2025-07-15 15:53:06 -07:00
parent 842da9d3f0
commit 9aae5cd1e5
3 changed files with 5 additions and 2 deletions

View File

@@ -75,6 +75,8 @@ $sleeptime = 0;
$allChan = 0;
$shiftMinutes = 0;
$userAgent = $ENV{USER_AGENT} || 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36';
$outputXTVD = 0;
$lineuptype;
$lineupname;
@@ -909,7 +911,7 @@ sub login {
$ua->conn_cache(LWP::ConnCache->new( total_capacity => undef ));
$ua->cookie_jar(HTTP::Cookies->new);
$ua->proxy(['http', 'https'], $proxy) if defined($proxy);
$ua->agent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36');
$ua->agent($userAgent);
$ua->default_headers->push_header('Accept-Encoding' => 'gzip, deflate');
}