use \Symfony\Component\Panther\Client;
require __DIR__ . '/vendor/autoload.php';
$options = [
'--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',
'--disable-blink-features=AutomationControlled',
'--enable-javascript'
];
$client = Client::createChromeClient(null, null, $options);
$url = 'https://example.ai/profile/';
$client->request('GET', $url);
我试图创建一个个人兴趣(学习)与Symfony/panther简单的网络刮刀脚本.目标Web应用程序很可能托管在Google Firebase上,也使用它的身份验证系统. 一旦我的脚本点击登录按钮,它就会成功进入个人资料页面.但这是没有意义的,因为当我试图导航到其他页面时,它再次以匿名用户的身份运行.它不持有身份验证.
我已经从真正的浏览器中进行了判断,在点击login button后,它将POST请求发送到以下URL端点:
identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=somekey
identitytoolkit.googleapis.com/v1/accounts:lookup?key=somekey
还有一些额外的POST请求,如:
us-central1-dreampen-xxxxx.cloudfunctions.net/getSubscriberInfo
Here is the error I am getting:
If anyone have any idea about this issue please show some tips:(个