N
N
nezzard2018-10-16 15:31:46
PHP
nezzard, 2018-10-16 15:31:46

How to parse content from Iframe?

Hello, I've searched all over the internet and can't find anything.
The essence of the task, there is an iframe in which there is html> body and so on.
I need to take a link from a specific container, I read on the Internet that if the iframe is on a different domain, then there is no such possibility.
But in English-language sources, information slipped through that you can use headless browsers for such things, parse the page and then parse it.
Tell me, is it still possible? If so, which way should you look?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
nezzard, 2018-10-16
@nezzard

I found a solution I
use puppeteer , added the --disable-web-security argument, then went through all the iframes and elements that I needed, reached the desired link

M
Maxim Timofeev, 2018-10-16
@webinar

It is not entirely clear why in the tags and php and node? What implementation do you need? In php, you can simply implement CURL and get the content of the page and parse it. But then the question arises "why do we need an iframe if we have already received its content?" Although it is possible for seo we do not always want to insert someone else's content into our content, so it is possible to have separate ifame and separate data from CURL.
If we are talking about node, then there really are headless browsers, read here:
https://habr.com/company/oleg-bunin/blog/421137/

R
RidgeA, 2018-10-16
@RidgeA


Tell me, is it still possible? If so, which way should you look?
headless browsers

E
eternalfire, 2018-10-16
@eternalfire

How to organize iframe parsing using javascript?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question