D
D
Dmitriy2019-07-28 20:26:48
PHP
Dmitriy, 2019-07-28 20:26:48

How to parse only paragraphs?

https://topradar.ru/product/eholot-striker-plus-4cv/ - a site that scab
5d3dda8188f6c493823796.jpeg
Only the text needs to be parsed.

$desc = $pw->find('div.spec-tabs__content div.tab:nth-child(1) ');

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2019-07-28
@IgorPI

I usually do regular parsing faster and more reliably.
In your case, you already got what you wanted . Return as text. and
5d3deca404057076800701.png

P
pdbqman, 2019-07-30
@pdbqman

it's very easy to find the right div.class using the simple_html_dom.php library
1. hook to your page with curl
2. use find to find the right div.class in the list.
3. further, with the help of foreach, you do what you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question