Answer the question
In order to leave comments, you need to log in
Why am I not getting a result on a POST request?
Sending a POST request:
$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => 'token='.$token.'&pdoduct=1&g-recaptcha-response=123',
CURLOPT_TIMEOUT => 60,
CURLOPT_CONNECTTIMEOUT => 30,
CURLOPT_COOKIEFILE => $cookie,
CURLOPT_COOKIEJAR => $cookie,
CURLOPT_ENCODING => 'gzip, deflate'
));
200
, then I look html
at the result, the whole page has loaded, but the expected result is missing, i.e. the whole page has loaded, but there is no div that would normally display the result of a query. F5
and see a POST request, instead of the usual page update, and I view the response to this POST request, and surprisingly I do NOT see the same one there div
, I will clarify that all parameters in the POST request are also passed.Answer the question
In order to leave comments, you need to log in
The desired div is generated via JS on the fly. Open the source code in the browser - if this div is not there, then I'm right.
Accordingly, it is not so easy to scrape this page. It is necessary to light up where this div and the data in it come from.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question