Open kironet opened 7 years ago
Well, the content in the Response is not valid HTML. so the HTML parsing fails
@stof It's returning just <section></section>
that's what I need. Can I somehow add doctype>html>head>/head>body> <section></section> >/body>/html
Can you fix your comment to use a markdown codeblock around the code ? I think the rendering stripped some content after just
(I don't understand your comment otherwise)
@stof fixed...
You said it's not valid HTML.
$response->getContent()
is returning <section>some info here</section>
To be valid it should be
<!doctrype html>
<html>
<head></head>
<body>
<section>some info here</section>
</body>
</html>
Am I right?
No, in the dump avoid, content is 1|#||4|25433|updatePanel|MainContent_UpdatePanel1|HTML_HERE
, meaning there are extra stuff at the beginning of the response, making it invalid HTML.
The response you receive is a text/plain
, not a text/html
one.
Hey,
I fixed my previous code. But now, I have a problem with crawler. It doesn't contain any html.
But when I'm dumping $client->getResponse(), I'm getting HTML in it.
crawler dump:
response dump:
What's wrong?