function __construct() { $this->userAgent = new UserAgentSwitcher('desktop'); $this->setDefaultOption(CURLOPT_USERAGENT, $this->userAgent->getRandomRecord()); $this->cookie = new CurlCookie(); $this->shareInit(); $this->init(); }
public function getUserAgent() { return $this->currentUserAgent ?: $this->userAgent->getRandomRecord(); }