A2C工单修复
This commit is contained in:
@@ -7,11 +7,12 @@ namespace app\common\library\scrm\spider;
|
||||
use app\common\library\scrm\AbstractScrmSpider;
|
||||
use app\common\library\scrm\AntiBotConfigBuilder;
|
||||
use app\common\library\scrm\UnifiedScrmData;
|
||||
use app\common\service\SplitPageUrlResolver;
|
||||
|
||||
/**
|
||||
* A2C 云控蜘蛛(Real Browser 打开分享页 + 拦截加密 API + UI 翻页)
|
||||
*
|
||||
* 业务域 user.a2c.chat 无需 cf_clearance;短链 yyk.ink 仍由浏览器 follow 跳转。
|
||||
* 业务域 user.a2c.chat 在 CF 挑战页启用 CapSolver 兜底;短链 yyk.ink 预解析为长链后直达业务页。
|
||||
*/
|
||||
class A2cSpider extends AbstractScrmSpider
|
||||
{
|
||||
@@ -27,6 +28,9 @@ class A2cSpider extends AbstractScrmSpider
|
||||
|
||||
private string $password;
|
||||
|
||||
/** @var string HTTP 预解析落地 URL(供 antiBot landingUrlHint) */
|
||||
private string $landingUrlHint = '';
|
||||
|
||||
private UnifiedScrmData $unifiedData;
|
||||
|
||||
public function __construct(
|
||||
@@ -39,6 +43,7 @@ class A2cSpider extends AbstractScrmSpider
|
||||
$this->pageUrl = $pageUrl;
|
||||
$this->account = $account;
|
||||
$this->password = $password;
|
||||
$this->landingUrlHint = SplitPageUrlResolver::resolveFinalUrl($pageUrl);
|
||||
$this->unifiedData = new UnifiedScrmData();
|
||||
}
|
||||
|
||||
@@ -53,7 +58,7 @@ class A2cSpider extends AbstractScrmSpider
|
||||
'authActions' => [
|
||||
['type' => 'wait', 'ms' => 2000],
|
||||
],
|
||||
'antiBot' => AntiBotConfigBuilder::build('a2c', $this->pageUrl),
|
||||
'antiBot' => AntiBotConfigBuilder::build('a2c', $this->pageUrl, $this->landingUrlHint),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user