20
20
21
21
class FreeNom extends Base
22
22
{
23
- const VERSION = 'v0.6.0 ' ;
23
+ const VERSION = 'v0.6.1 ' ;
24
24
25
25
const TIMEOUT = 33 ;
26
26
@@ -93,7 +93,7 @@ private function __construct()
93
93
'headers ' => [
94
94
'Accept ' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 ' ,
95
95
'Accept-Encoding ' => 'gzip, deflate, br ' ,
96
- 'User-Agent ' => sprintf ( 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36 ' , get_random_user_agent ()) ,
96
+ 'User-Agent ' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 ' ,
97
97
],
98
98
'timeout ' => self ::TIMEOUT ,
99
99
CURLOPT_FOLLOWLOCATION => true ,
@@ -435,6 +435,8 @@ public function handle()
435
435
$ accounts = $ this ->getAccounts ();
436
436
$ totalAccounts = count ($ accounts );
437
437
438
+ $ awsWafToken = getAwsWafToken ();
439
+
438
440
system_log (sprintf (lang ('100049 ' ), $ totalAccounts ));
439
441
440
442
foreach ($ accounts as $ index => $ account ) {
@@ -446,9 +448,9 @@ public function handle()
446
448
system_log (sprintf (lang ('100050 ' ), get_local_num ($ num ), $ this ->username , $ num , $ totalAccounts ));
447
449
448
450
$ this ->jar = new CookieJar (); // 所有请求共用一个 CookieJar 实例
449
-
450
- $ awsWafToken = getAwsWafToken ( );
451
- $ this -> jar -> setCookie ( buildAwsWafCookie ( $ awsWafToken ));
451
+ if ( $ awsWafToken !== '' ) {
452
+ $ this -> jar -> setCookie ( buildAwsWafCookie ( $ awsWafToken ) );
453
+ }
452
454
453
455
$ this ->login ($ this ->username , $ this ->password );
454
456
0 commit comments